- Describe Trees using specific vocabulary
- Implement a Tree in JavaScript
- Root - node at the top of the tree.
- Parent - node above a node.
- Child - node below a node.
- Leaf Node - node that does not have a child.
- Height/Depth - Number of edges in longest path from X to a leaf.
-
What is a recursive data sctructure? How is a tree recursive in nature?
Your answer...
-
On your desk, create a tree containing the following values (in any order):
4, 1, 8, 3, 2How many steps does it take to find the value
3?Your answer...
-
Given pseudocode write an algorithm to print every value in a tree:
print root node value for each child of root node print node value for each child of child print node value ...(This pseudocode is recursive... what is the base condition for this recursive algorithm?)
Code your solution here: https://repl.it/@galvanize/BasicTrees