PracticeExam2answers

PracticeExam2answers - CS 114 Practice Exam Name_ For each...

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 8 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: Euler: 70L 40L 10L 10B 10R 40B 60L 60B 60R 40R 70B 80L 80L 80B 80R 80B 90L 90B 90R 80R 70R a) preorder traversal 70 40 10 60 80 80 90 b) inorder traversal 10 40 60 70 80 80 90 c) postorder traversal 10 60 40 80 90 80 70 5) Draw the binary search tree that results from entering numbers in the following order: 60 30 10 90 20 80 70 60 30 90 10 80 20 70 Page 2 of 8
Background image of page 2
6) Delete 40 from the BST below: Page 3 of 8 40 20 80 10 30 60 90 50 70 20 80 10 30 60 90 50 X 70 20 80 10 30 60 90 50 70
Background image of page 3

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

View Full DocumentRight Arrow Icon
Using the 2-3-4 tree: Insert the value 32 and draw the resulting tree. Page 4 of 8
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 / 8

PracticeExam2answers - CS 114 Practice Exam Name_ For each...

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