Shopee interview question

Top k in an array; Topological sort