PracticeExam2

PracticeExam2 - CS 114 Practice Exam Name_ For each of the...

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

View Full Document Right Arrow Icon
CS 114 Practice Exam Name________________________________________________ For each of the trees below, circle all descriptions that apply: (assume heap stores largest value at the root) 1) a)full b)complete c)search tree d)heap e)balanced 2) a)full b)complete c)search tree d)heap e)balanced 3) a)full b)complete c)search tree d)heap e)balanced Page 1 of 6 40 20 50 10 80 10 40 20 50 70 40 80 10 60 80 90 30
Background image of page 1

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

View Full DocumentRight Arrow Icon
4) Using the tree from problem 3, write all the nodes using: a) preorder traversal b) inorder traversal c) postorder traversal 5) Draw the binary search tree that results from entering numbers in the following order: 60 30 10 90 20 80 70 6) Delete 40 from the BST below: Page 2 of 6 40 20 80 10 30 60 90 50 70
Background image of page 2
7) Using the 2-3-4 tree: Insert the value 32 and draw the resulting tree. Page 3 of 6 25 50 10 37 45 55 30 15 20 40 70 60 75 65 35
Background image of page 3

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

View Full DocumentRight Arrow Icon
Starting with the same tree as problem 7, delete the 65 and draw the resulting tree. 9)
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 09/21/2009.

Page1 / 6

PracticeExam2 - CS 114 Practice Exam Name_ For each of the...

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

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