---
# System prepended metadata

title: Untitled

---

ハ来目於網際網路的至可能有病事,除非你是 信 中收為安全

ert.cpp (c++ 語

1 #include <iostream>

2 #include <cstdlib> /* BL */

3 #include <ctime> /* BPTERER /

4 using namespace std; 5 #define MAX 50

6 #define PRINT

LEN

10

7

8 void InsertionSort(int *arr, int size){

9

for (int i = 1; i < size; i++) {

10

int key = arr[i];

11

int j = i - 1;

12 13

while (key < arr[j] && j >= 0) { arr[j+1] = arr[j]:

14

15

arr[j+1] = key;

16

17

18 } 19

20 votd PrintArray(int *arr, int size)( for (int i = 0; i < size; i++) { cout << arr[i] << ";

21

22

23 }

24 cout << endl;

25}

22

P* ()

A

outa