Microsoft Interview Question

questions was about algorithm with array manipulation