Anonymous user
Sorting algorithms/Insertion sort: Difference between revisions
Sorting algorithms/Insertion sort (view source)
Revision as of 20:25, 26 January 2012
, 12 years ago→{{header|MATLAB}}: works fine with Octave, too. Verified with Octave 3.4.3
(→{{header|MATLAB}}: works fine with Octave, too. Verified with Octave 3.4.3) |
|||
Line 916:
print(unpack(isort{4,5,2,7,8,3}))</lang>
=={{header|MATLAB}} / {{header|Octave}}==
This is a direct translation of the pseudo-code above, except that it has been modified to compensate for MATLAB's 1 based arrays.
<lang MATLAB>function list = insertionSort(list)
Line 941:
1 2 3 4 5 6</lang>
=={{header|Modula-3}}==
|