Pregunta de entrevista de Meta

Kth largest element in an array and directory problem given cwd and arg cd.