Skip to content

Commit 255cd82

Browse files
committed
fixed index issues for the array
1 parent 8dd7ab0 commit 255cd82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

2-selection_sort.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void selection_sort(int *array, size_t size)
2727
{
2828
/* Swapping */
2929
temp = array[i];
30-
array[l] = array[low_index];
30+
array[i] = array[low_index];
3131
array[low_index] = temp;
3232
print_array(array, size);
3333
} /* End if */

0 commit comments

Comments
 (0)