I have looked at the following example posts (amongst many) and none fit my requirements unfortunately:
Here is the description of the problem.
We have a list of key/value elements (I want to avoid using the term 'dictionary' for now), sorted by value, where the 'value' of any given element can change at any time and it changes frequently. Once any given value changes, we need to sort the list of elements by value again. Once the re-sort is done we need to know the index of each element in the list BY KEY to calculate each that element's PERCENTILE.
In other words, we need to calculate the PERCENTILE of each element in a LARGE sorted (by value) list of key/value elements where the values change rapidly.
Obviously there is a 'naive' way of doing this, however, considering the number of changes in values, the large number of key/value pairs, the re-sorting, and the calculation of percentiles each and every time, this will not be functional.
Does anyone have a very fast algorithm (or heuristic) that does this?