Computer Science, asked by gunenderchauhan1727, 8 months ago

How Treemap Works Internally In Java

Answers

Answered by Inbat
0

Answer:

Treemap class is like HashMap which stores key- value pairs

Explanation:

Treemap is sorted according to the natural ordering of its keys, or by a Comparator provided at map creation time, depending on which constructor is used.

This implementation provides guaranteed log(n) time cost for the containsKey, get, put and remove operations. Algorithms are adaptations of those in Cormen, Leiserson, and Rivest's Introduction to Algorithms.

Similar questions