1
10 14 18 19 3 7 16 17 23 25 2 11
Merge and Count
Merge and count step.
■ Given two sorted halves, count number of inversions where ai and aj
are in different halves.
■ Combine two sorted halves into sorted whole.
Merge and Count Merge and count step. Given two sorted halves, - - PowerPoint PPT Presentation
Merge and Count Merge and count step. Given two sorted halves, count number of inversions where a i and a j are in different halves. Combine two sorted halves into sorted whole. i = 6 3 7 10 14 18 19 2 11 16 17 23 25 two
1
■ Given two sorted halves, count number of inversions where ai and aj
■ Combine two sorted halves into sorted whole.
2
■ Given two sorted halves, count number of inversions where ai and aj
■ Combine two sorted halves into sorted whole.
3
■ Given two sorted halves, count number of inversions where ai and aj
■ Combine two sorted halves into sorted whole.
4
■ Given two sorted halves, count number of inversions where ai and aj
■ Combine two sorted halves into sorted whole.
5
■ Given two sorted halves, count number of inversions where ai and aj
■ Combine two sorted halves into sorted whole.
6
■ Given two sorted halves, count number of inversions where ai and aj
■ Combine two sorted halves into sorted whole.
7
■ Given two sorted halves, count number of inversions where ai and aj
■ Combine two sorted halves into sorted whole.
8
■ Given two sorted halves, count number of inversions where ai and aj
■ Combine two sorted halves into sorted whole.
9
■ Given two sorted halves, count number of inversions where ai and aj
■ Combine two sorted halves into sorted whole.
10
■ Given two sorted halves, count number of inversions where ai and aj
■ Combine two sorted halves into sorted whole.
11
■ Given two sorted halves, count number of inversions where ai and aj
■ Combine two sorted halves into sorted whole.
12
■ Given two sorted halves, count number of inversions where ai and aj
■ Combine two sorted halves into sorted whole.
13
■ Given two sorted halves, count number of inversions where ai and aj
■ Combine two sorted halves into sorted whole.
14
■ Given two sorted halves, count number of inversions where ai and aj
■ Combine two sorted halves into sorted whole.
15
■ Given two sorted halves, count number of inversions where ai and aj
■ Combine two sorted halves into sorted whole.
16
■ Given two sorted halves, count number of inversions where ai and aj
■ Combine two sorted halves into sorted whole.
17
■ Given two sorted halves, count number of inversions where ai and aj
■ Combine two sorted halves into sorted whole.
18
■ Given two sorted halves, count number of inversions where ai and aj
■ Combine two sorted halves into sorted whole.
19
■ Given two sorted halves, count number of inversions where ai and aj
■ Combine two sorted halves into sorted whole.
20
■ Given two sorted halves, count number of inversions where ai and aj
■ Combine two sorted halves into sorted whole.
21
■ Given two sorted halves, count number of inversions where ai and aj
■ Combine two sorted halves into sorted whole.
22
■ Given two sorted halves, count number of inversions where ai and aj
■ Combine two sorted halves into sorted whole.
23
■ Given two sorted halves, count number of inversions where ai and aj
■ Combine two sorted halves into sorted whole.
24
■ Given two sorted halves, count number of inversions where ai and aj
■ Combine two sorted halves into sorted whole.
25
■ Given two sorted halves, count number of inversions where ai and aj
■ Combine two sorted halves into sorted whole.