5 ms·
Ask HN: Why is the top node of a tree structure called root node instead of tip?
- quickthrower2 6y agoIntuitively I think it is because "root" means "origin" (e.g. tell me about your roots i.e. your family, or the root of all evil etc.), and the top node is where you start when navigating the tree (it would be the memory reference you have first because it is stored in a variable, and you need to traverse to get to other nodes). Using a physical tree analogy I'd call it a trunk rather than a root (and ignore that a real tree has roots entirely because they are a tree in their own right!)
- soygul 6y ago> Using a physical tree analogy I'd call it a trunk rather than a root I will start calling it "tip" instead and see how people react!
- lioeters 6y agoIt's because the tree is upside-down, growing from the top (root) to the branches and leaves (the tips) below.