Rotate array. He asked to propose any solution first, and then optimise it.
Anonymous
I said I have encountered this question and know the optimal solution with O(n) time and O(1) space. He asked to explain solution and then code it. Once I completed - he asked to do unit test and say few test cases - I did it.
Check out your Company Bowl for anonymous work chats.