REARRANGE LOGIC:

initial:
0 a
1 b
2 c => 
3 d
4 e

move c => 0:
0 a    0 c
1 b    1 a
2 c => 2 b
3 d    3 d
4 e    4 e
       
move(2, 0)

move c, e => 0
0 a    0 e    0 c
1 b    1 a    1 e
2 c => 2 b => 2 a
3 d    3 c    3 b
4 e    4 d    4 d
       
move(4, 0)
move(3, 0)

move c => 1
0 a    0 a
1 b    1 c
2 c => 2 b
3 d    3 d
4 e    4 e
       
move(2, 1)

move c, a => 1

0 a    0 a    0 a (idx < target_idx, so target--? and target-- == idx so do nothing?)
1 b    1 c    1 c    
2 c => 2 b => 2 b
3 d    3 d    3 d    
4 e    4 e    4 e

move(2, 1)
move(0, 0)

move a, b => 2

0 a    0 a    0 c
1 b    1 c    1 a    
2 c => 2 b => 2 b
3 d    3 d    3 d    
4 e    4 e    4 e    

move(1, 2)
move(0, 1)

move a, c, e => 3
0 a    0 a    0 a    0 b
1 b    1 b    1 b    1 d    
2 c => 2 c => 2 d => 2 a
3 d    3 d    3 c    3 c    
4 e    4 e    4 e    4 e    

move(4, 4) (move(4, 3) ?)
move(2, 3)
move(0, 2)


--

if index < target, increase index offset
else increase target offset


---

cycle decomposition:

{0, 1, 2, 3, 4, 5} => {0, 1, 3, 5, 2, 4}

2 -> 4
3 -> 2

4 -> 5
5 -> 3

(2, 3)(4, 5)

---

{0, 1, 2, 3, 4} => {1, 3, 0, 2, 4}

0 -> 1
1 -> 3
3 -> 2
2 -> 0

4 -> 4
 
(0, 1, 3, 2)(4)
(0, 2)(0, 3)(0, 1)

(0, 2) = {2, 1, 0, 3, 4}
(0, 3) = {3, 1, 0, 2, 4}
(0, 1) = {1, 3, 0, 2, 4}

---

determine "slice" of the array we're working with:

start = min(target_idx, min(indexes))
end   = max(target_idx, max(indexes))


i = {0, 1, 2, 3, 4, 5}

out     = {1, 3, 0, 2, 4, 5}
i - indices = {1, 3, 5}

out = {1, 3, {indicies}, 5}


reorder::get_swaps(...)
target index  = 1
moved indices = [6]
input  order  = [0, 1, 2, 3, 4, 5, 6]
output order  = [0, 6, 1, 2, 3, 4, 5]
cycle found, traversal complete.
cycle found, traversal complete.
recursive return (1, 2) (i = 2 j = 1)
recursive return (1, 3) (i = 3 j = 1)
recursive return (1, 4) (i = 4 j = 1)
recursive return (1, 5) (i = 5 j = 1)
recursive return (1, 6) (i = 6 j = 1)
map   = {0: 0, 1: 6, 2: 1, 3: 2, 4: 3, 5: 4, 6: 5}
swaps = [(1, 2), (1, 3), (1, 4), (1, 5), (1, 6)]
