Vladimir Joanna Joel Eric Yoel Adriana Lance Aaron Divide into two problems
Vladimir Joanna Joel Eric YoelAdrianaLanceAaron Sort each list recursively
VladimirJoannaJoelEricYoelAdrianaLanceAaron Sort each list recursively
VladimirJoannaJoelEricYoelAdrianaLanceAaron Merge the two lists
VladimirJoannaJoelEricYoelAdrianaLanceAaron Merge the two lists
VladimirJoannaJoelEricYoelLance Merge the two lists AaronAdriana
VladimirJoannaJoelYoelLance Merge the two lists AaronAdrianaEric
Counting Inversions Divide into front and back halves Count inversions within each half, and sort each half Then, count inversions between front and back half
Counting Inversions between front and back front: back: Merge. Whenever a back item is pushed up, count how many it goes past
Counting Inversions between front and back front: back: Merge. Whenever a back item is pushed up, count how many it goes past skips over 2, 4, 6 and 7 Inversions: 4
Counting Inversions between front and back front: back: Merge. Whenever a back item is pushed up, count how many it goes past from front, nothing to count 1 Inversions: 4
Counting Inversions between front and back front: back: Merge. Whenever a back item is pushed up, count how many it goes past from front, nothing to count 1 2 Inversions: 4
Counting Inversions between front and back front: back: Merge. Whenever a back item is pushed up, count how many it goes past 3 skips over 4, 6, and Inversions:
Inversions: 4 Counting Inversions between front and back front: back: Merge. Whenever a back item is pushed up, count how many it goes past 3 skips over 4, 6, and Inversions:
Inversions: 4 Counting Inversions between front and back front: back: Merge. Whenever a back item is pushed up, count how many it goes past 4 is in front: no change 1 2 Inversions:
Inversions: 4 Counting Inversions between front and back front: back: Merge. Whenever a back item is pushed up, count how many it goes past 5 moves past 6 and Inversions:
Inversions: 4 Counting Inversions between front and back front: back: Merge. Whenever a back item is pushed up, count how many it goes past 5 moves past 6 and Inversions: