The pigeonhole array is then iterated over in order, and the elements are moved back to the original list.
The pigeonhole array is then iterated over in order and the elements are moved back to the original list