Skip to content

Commit 1d98381

Browse files
committed
Fix comb sort
1 parent f22da2b commit 1d98381

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

algorithms/sorting/comb_sort.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
%This function sorts the input array in ascending order using the Comb Sort algorithm
22
%For details, refer https://en.wikipedia.org/wiki/Comb_sort
33

4-
function y = combSort(array)
4+
function y = comb_sort(array)
55

66
len = length(array);
77
k = len;
@@ -21,7 +21,7 @@
2121
i = i + 1;
2222
end
2323
end
24-
24+
y = array;
2525
end
2626

2727
function array = swap(array,i,j)

0 commit comments

Comments
 (0)