PrepZone Logo
PrepZone
Back to Java

Java · Easy

What is the time complexity of TreeMap for put()/get()?

JavaCollections

Answer preview

O(log n) — for put(), get(), remove(), and containsKey().…