Fiverr Inc. interview question

Write a function that get's an array and an Integer. The function should modify the existing array (without using any additional space) and bring n elements from the beginning of the array to the end of it, keeping the order.

Interview Answer

Anonymous

Dec 24, 2022

I tried having two-pointers and playing with it. I think I should have just `shift` an element and then `push` it.