Source: Grove Positioning System
Part 1
Given a list of numbers
mix
them by moving each number forward/backward in the list based on it’s value. For example, in4, -2, 5, 6, 7, 8, 9
moving the-2
will result in4, 5, 6, 7, 8, -2, 9
. Each number should be moved exactly once in the original order they appeared in the list.