Move k elements in Array.
Anonymous
I can solve this in O(n) with extra space but O(n) without extra space is the ideal way. Answer - First reverse the array. Then reverse 0th to kth element. Then reverse from kth element to nth elemt.
Check out your Company Bowl for anonymous work chats.