Domanda di colloquio di Microsoft

Rotate array. He asked to propose any solution first, and then optimise it.

Risposta di colloquio

Anonimo

14 dic 2019

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.