Introduction to Trees


Terms

Degree  -  The maximum number of children that a node in a tree can have.
Binary Search  -  A search for a particular item from an ordered set. The process is as follows: 1. check the middle element in the set. 2. If the desired element precedes the middle element, then reduce the set to the first half of the original data set and proceed with another binary search. Similarly, if the desired element is after the middle element, do a binary search on the second half of the set. Continue until you either find the desired element or there is nothing left to search.
Binary Search Trees  -  A tree where all of the nodes in a left subtree precede the root node in a given ordering scheme, all the nodes in the right subtree come after the root node in the same scheme, and where both the left and the right subtrees are also binary search trees.
Node  -  Any element of a tree. Contains some data and potentially has children, which are other nodes in the tree.
Descendant  -  Any node that can be reached from the current node by following the children branches.
Root  -  The node from which all other nodes in the tree descend.
Child  -  In a tree, nodes can point to the roots of subtrees. The roots of the subtrees below a given node are the children of that node.
Leaf  -  A node in a tree that has no children.
Algorithm  -  A process, or a series of steps, for accomplishing a given task.
Recursive  -  Something that is defined in terms of itself.

Take a Study Break

SparkLife

Star Trek gets SEXY

Chris Pine and Zoe Saldana heat up the red carpet!

SparkLife

Are you afraid of relationships?

Auntie SparkNotes can help!

SparkLife

Wanna get JLaw's gorgeous glow?

Click here for simple, sexy makeup tricks!

SparkLife

Sexy starlet style

See every single look from the Met Gala!

SparkLife

Who'd be on your zombie-apocalypse crew?

We already dib'sed Genghis Khan.

Geek out!

The MindHut

Geeky Actresses: Then and Now

Before the fame!

The MindHut

9 Scientific Inaccuracies in Iron Man 3

Click to see what they got wrong.

The MindHut

Top 10 Predictions Sci-Fi Got WRONG

So wrong, they're WRONG.

The MindHut

The 15 Most Awesome Robots, Ever

These Robots Rock!

The MindHut

If You Like Game of Thrones...

...Then you'll LOVE these books!

The Book

Cover image

Read What You Love, Anywhere You Like

Get Our FREE NOOK Reading Apps