ION Group interview question

Puzzle about robots that needed some permutation