Is there a SortedList in Java

461    Asked by DonnaChapman in Python , Asked on Jul 16, 2021

In Java there are the SortedSet and SortedMap interfaces, but no SortedList interface.

Answered by Bernadette Bond

You can try using indexed-tree-map to get sorted list java. It is an increased JDK's TreeSet that provides access to element by index and finding the index of an element without iteration or hidden underlying lists that back up the tree. The algorithm is based on updating weights of changing nodes every time there is a change.




Your Answer

Interviews

Parent Categories