Pergunta de entrevista da empresa Lam Research

Sort k nearest neighbours in an array