Merge Sort
[16,21,11,8,12,22]
1-Write the stages of the array according to sort type
2-Write Big-O Notation
~ Solution of first question:
1.step: [16,21,11,8,12,22]
2.step: [16,21,11] - [8,12,22]
3.step: [16] - [21,11] - [8,12] - [22]
4.step: [16] - [21] - [11] - [8] - [12] - [22]
5.step: [16] - [11,21] - [8,12] - [22]
6.step: [11,16,21] - [8,12,22]
7.step: [8,11,12,16,21,22]
~ Solution of second question:
O(nlogn)