Do they work in linear time?
Of course, they are: when the data is on the tree map, the search for K-order statistics is an O (N) * operation . Moreover, the likelihood that the operating system TreeMapwill have a lower constant coefficient if you do not decide to write a sorted container to an array.
, TreeMap - O (N * log 2 N), Median of Medians , . TreeMap .
* O (log 2 N), .