12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- dust particles [(5, 6), (9, 4), (7, 2), (1, 2), (5, 2), (2, 0), (3, 8), (6, 7), (8, 2), (7, 4)]
- dust sorted [(2, 0), (1, 2), (5, 2), (7, 2), (8, 2), (5, 6), (3, 8), (7, 4), (9, 4), (6, 7)]
- next closest particle (2, 0) at index 0
- robot is at 0 0 driving to 2 0 with a dist of 2
- (2, 0) popped
- next closest particle (1, 2) at index 0
- robot is at 2 0 driving to 1 2 with a dist of 3
- (1, 2) popped
- next closest particle (5, 2) at index 0
- robot is at 1 2 driving to 5 2 with a dist of 4
- (5, 2) popped
- next closest particle (3, 8) at index 3
- robot is at 5 2 driving to 3 8 with a dist of 8
- (3, 8) popped
- next closest particle (7, 2) at index 0
- robot is at 3 8 driving to 7 2 with a dist of 10
- (7, 2) popped
- next closest particle (5, 6) at index 1
- robot is at 7 2 driving to 0 0 with a dist of 9
- recharged!
- next closest particle (8, 2) at index 0
- robot is at 0 0 driving to 8 2 with a dist of 10
- (8, 2) popped
- next closest particle (7, 4) at index 1
- robot is at 8 2 driving to 7 4 with a dist of 3
- (7, 4) popped
- next closest particle (5, 6) at index 0
- robot is at 7 4 driving to 5 6 with a dist of 4
- (5, 6) popped
- next closest particle (9, 4) at index 0
- robot is at 5 6 driving to 0 0 with a dist of 11
- recharged!
- next closest particle (9, 4) at index 0
- robot is at 0 0 driving to 9 4 with a dist of 13
- (9, 4) popped
- next closest particle (6, 7) at index 1
- robot is at 9 4 driving to 0 0 with a dist of 13
- recharged!
- next closest particle (6, 7) at index 0
- robot is at 0 0 driving to 6 7 with a dist of 13
- (6, 7) popped
- []
|