Top-N Indices with argpartition
Interview insights are lockedSee how often this is asked and which companies asked it with Buncho Pro.Given an array of scores, return the indices of the 3 largest values. Do it with argsort, then with a faster approach. How do you do it per row of a 2-D array?
Hints, AI feedback and the reference answer are for Pro members.Unlock with Pro