Skip to content

Commit 82da0eb

Browse files
committed
fix: radixSort 오류 수정
1 parent 236e550 commit 82da0eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

yoonexample/src/main/java/sort/RadixSort.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ public void sort(int[] array, int maxLength) {
2828
}
2929

3030
// 버킷 수 만큼 반복
31+
int arrayIndex = 0;
3132
for (int j = 0; j < BUCKET_NUM; j++) {
3233
// 버킷에 저장되어 있는 것을 순서대로 꺼내서 다시 array에 저장
33-
int arrayIndex = 0;
3434
while (!buckets[j].isEmpty()) {
3535
array[arrayIndex++] = buckets[j].dequeue();
3636
}

0 commit comments

Comments
 (0)