Skip to content

Glossary: Coding Interviews in Java

LinkedHashMap / TreeMap

Also written: LinkedHashMap, TreeMap

Java maps with a predictable order: `LinkedHashMap` remembers insertion order and `TreeMap` keeps its keys sorted. They are useful for stable printing and for a report sorted by name.

Where the book teaches it

Related terms

HashMap / HashSet