How does `HashMap` differ from `TreeMap` in Java?
`HashMap` is faster for most operations because it does not maintain any ordering, while `TreeMap` maintains a sorted order of keys.
Well done! You've understood the performance and ordering aspects.
Can you explain the underlying data structure of `TreeMap` and why it provides sorted keys?