← ALL NOTES
Algorithms

2089. Find Target Indices After Sorting Array

The array never has to be sorted. Where the target lands after sorting is decided entirely by two counts: how many values sit strictly below it, and how many copies of it the array holds.

Loading…