Skip to content

Commit cd4aac3

Browse files
fix typo
1 parent 84710a3 commit cd4aac3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

algorithms/sorting/select_sort.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
%%smallest element in the unsorted list
55
minimum_index=i;
66
for j=i+1:length(arrayToSort)
7-
if (arrayToSort(j) < arrayToSort(minimun_index))
8-
minimun_index=j;
7+
if (arrayToSort(j) < arrayToSort(minimum_index))
8+
minimum_index=j;
99
endif
1010
endfor
11-
%%replace the element with the minimun value of the unsorted array
12-
arrayToSort([i minimun_index]) = arrayToSort([minimun_index i]);
11+
%%replace the element with the minimum value of the unsorted array
12+
arrayToSort([i minimum_index]) = arrayToSort([minimum_index i]);
1313
endfor
1414
endfunction

0 commit comments

Comments
 (0)