Sorting algorithms/Insertion sort: Difference between revisions

Content added Content deleted
(→‎{{header|C}}: size should be an unsigned int, size_t is even better because it uses the proper size for your architecture (32-bit on x86, 64-bit on x86_64))
(→‎{{header|C}}: add static)
Line 190: Line 190:


=={{header|C}}==
=={{header|C}}==
<lang c>void insertion_sort(int *a, const size_t n) {
<lang c>static void insertion_sort(int *a, const size_t n) {
size_t i, j;
size_t i, j;
int value;
int value;
Line 207: Line 207:
insertion_sort(a, n);
insertion_sort(a, n);
return 0;
return 0;
}</lang>
}
</lang>


=={{header|C++}}==
=={{header|C++}}==