Lab_BinarySearchTrees

Lab_BinarySearchTrees - You may use

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CECS 230 Names ____________________________________ Binary Search Tree Lab 1. Individual practice: Build and draw a small binary search tree by hand: 55, 39, 45, 76, 11, 77, 63, 19, 75, 39, 22, 25 What is the worst case depth of this data set? What is the best case depth of this data set? 2. (Team exercise) Find a way to remove 55 from the tree without redrawing the entire tree. It must still be a valid BST. Redraw the tree and explain your method.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: You may use http://webpages.ull.es/users/jriera/Docencia/AVL/AVL%20tree%20applet.htm PA 3. (Team exercise) Traverse your tree from #1 using inorder search Inorder(node) { Inorder(leftchild) Report(node.value) Inorder(rightchild) } 4. (Team exercise) Traverse your tree from #1 using postorder search postorder(node) { postorder(leftchild) postorder(rightchild) Report(node value } 5. Team Exercise explain how AVL trees work PA...
View Full Document

Page1 / 2

Lab_BinarySearchTrees - You may use

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online