| 32 | } |
| 33 | |
| 34 | int main() |
| 35 | { |
| 36 | system("CLS"); |
| 37 | int arr[] = {-12, 5, 8, 3, 0, 9, -50, -3, -2, -1}; |
| 38 | int n = sizeof(arr) / sizeof(int); |
| 39 | insertion_sort(arr, n); |
| 40 | for (auto x : arr) |
| 41 | cout << x << " , "; |
| 42 | |
| 43 | return 0; |
| 44 | }--> Similar to playing cards |
| 45 | --> Insert cards in its correct position in sorted part |
| 46 | --> Insertion Sort is a sorting algorithm that places the input element at its suitable place in each pass. |
| 47 | */ |
no test coverage detected