Logout

5.1.17

Sketch binary trees.

 

Teaching Note:

Students should be able to sketch diagrams showing the resulting binary tree after adding a new data item, adding one or more new nodes, and/or removing one or more nodes.

 

Sample Question:

sdfsdfsf

JSR Notes:

Here's a video of it all, followed by screen shots of what you diagrams should look like.

Loading the player...

Adding a node to a tree.

Adding A Node to a Tree

 

Tree removeal if no children

Removing a Node which has No Children

 

ONe child

Removing a Node which has One Child

 

Two children

Removing a Node which has Two Children

--> But note here that the smallest in the right sub-tree could have a child or subtree too the right, so it's parent will have to be re-linked to it's right child/subtree. (In 2014, this was the situation on the quizlette, but not considered initially in class.)

Two children removal - B