X interview question

Show how to rank items in an array using linear space.

Interview Answer

Anonymous

3 Aug 2017

If the ranks are numbers you can use a min/max heap and then pop them off into an array