Pergunta de entrevista da empresa Atlassian

Somewhat similar to "Find Kth smallest element"