Pregunta de entrevista de Apple

Rotate array around K And a problem using heaps and one on binary trees