T12_BST_Q

# T12_BST_Q - of a binary tree T and compute(a The number of...

This preview shows page 1. Sign up to view the full content.

COMP 152 Spring 2010 Tutorial # 13 Questions (Binary Search Trees) 1. (W4.4) Show that in a binary tree of N nodes, there are N + 1 NULL links. 2. (W4.6) A full node is a node with two children. Prove that the number of full nodes plus one is equal to the number of leaves in a nonempty binary tree. 3. (W4.8) Give preFx, inFx, and postFx expressions corresponding to the tree: - / \ * e / \ * + / \ / \ a b c d 4. (W4.31) Write e±cient functions that take only a pointer to the root
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: of a binary tree, T , and compute (a) The number of nodes in T . (b) The number of leaves in T . (c) The number of full nodes in T . 5. (W4.40) Write an e±cient routine to list out the nodes of a binary tree in level-order. List the root, then nodes at depth 1, followed by nodes at depth 2, and so on. 1...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online