Nubank interview question

some min heap also could be sorting