- A leaf, which is the end (has no children)
- A branch, which may have leaves or more branches (has children)... and because a branch can have more branches, this is recursion, so we abstract to a 3rd type of part:
- A node, which could be a branch or a leaf...
Imagine if you were blind and had to feel your hand up the stem, and when you reach a node, you'd move your hand up the node to check 'is this a leaf, or a branch'
If it's a leaf, you mark it; but if it's a branch, you move your hand along the branch and do the same check for the next nodes 'is this a leaf, or a branch'... function int getNumLeaves(Node node):
foreach childNode in node:
if childNode.IsLeaf(): leafCount++
else: return getNumLeaves(childNode) // NOT a leaf -> check this branch's children
print getNumLeaves(tree.stem); // (start with the outermost 'node')
The pseudocode above could have errors, but it's simple enough to get started for understanding;)
From the article itself, the Pyramids are only 12,000 years old. Every other Ancient Wonder has been destroyed.
Essentially there’s a Major Cataclysm about every 10,000 years, and a ‘Minor’ one about every 5000 years (Burkle Crater impact being the most recent).
How do you assume any parts of the Hoover Dam would be intact or even visible “hundreds of thousands of years from now”?