Pregunta de entrevista de Sketch Brahma Technologies

Move k elements in Array.

Respuesta de la entrevista

Anónimo

13 jul 2024

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.