Hacker News new | ask | show | jobs
by aidenn0 3715 days ago
Have you ever stored a dictionary inside a dictionary? (e.g. something like the JSON:

    {foo : {bar : "baz"}}
That's a tree.
1 comments

...unless it's a hashmap inside a hashmap. Or named fields in an object holding pointers that use no keys after compilation.

The point being that hierarchical structures in programming languages abstract away from the underlying representation, and you can use them without knowing the details. (Though you should probably know anyway, so you understand your Big-O tradeoffs.)

A hashmap inside of a hashmap is just as much of a tree as an array inside of an array (which for a 2 element array describes a binary tree).