assign3 - CSE2011F06/HR - Assignment #3 - Due Oct. 25, 06...

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

View Full Document Right Arrow Icon
CSE2011F06/HR - Assignment #3 - Due Oct. 25, 06 Trees 1. Answer the following questions about a non-empty binary tree of N nodes and height H : a. Prove that the number of null links in the tree is N+1 . b. Prove that the number of nodes with two children is one less than the number of leaves. c. Prove that N ≤ 2 H+1 - 1 . d. Assuming that each node holds a single character and that the inorder and preorder traversals yield ambmcpdse and smmabpcde respectively, draw the tree and list its nodes in postorder. 2. The FileList application is designed to print out the names and sizes of all files in a directory and all its subdirectories with depth-dependent indentation. The program is 100% complete except for the body of the if statement in the list method (the missing part is denoted by ?? ). Supply the missing part using a minimal number of statements. Compile and run your program and verify that it behaves as specified. 3. The
Background image of page 1

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

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

This note was uploaded on 12/11/2010 for the course CSE CSE 2011 taught by Professor Neugyen during the Fall '09 term at York University.

Page1 / 2

assign3 - CSE2011F06/HR - Assignment #3 - Due Oct. 25, 06...

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