I am interested in such a question: as we know, *Red-Black tree* provides efficient implementation of such operations as *successor* (the first element higher that entry) and *predecessor* , i.e. in log - time.
In **Java documentation** is written that for providing such operation as successor you may merely use subSet and then took the least element in the **subSet**. But is it log-time? If it is, what is the implementation of **subSet**?(I am interested in the algorithm, so it may be just few words, not necessary code)
Thanks. I'm not sure I get the question: HashSet does have methods lower(E e) and higher(E e).