PriorityList
Functions
Link copied to clipboard
If a value wasn't previously added to the list, simply adds it with a given priority. Otherwise, in case if priority is less or equal to the priority of existent element(s), does nothing. Otherwise, removes all existing elements from the list and adds value with a given priority. Complexity: O(n + k * log(n)) where k is a number of elements equal to value
Link copied to clipboard
All collection elements Complexity: O(n)
Link copied to clipboard
All elements with their priorities ordered by the time of adding (elements added earlier go first) Complexity: O(n log(n))
Link copied to clipboard
Link copied to clipboard