Vous êtes sur la page 1sur 1

UMT

#3

BSEE
Spring 2016
Due Date: May 19

Section:

EE213 Data Structures and Algorithms

Name:

Assignment
ID:

Q1. Write a function for preorder traversal in a BST.

(5 marks)

void preorder(TNode * root){


// Your code
}
Q2. Write a code to find the maximum value in a BST.

(5 marks)

void max(TNode * root ){


// Your code
}
Q3.
1+1+2+6)

(Marks:

For the tree in Figure below:


Q1. Which node is the root?
Q2. What is the depth of the tree?
Q3. Which nodes are leaves?
Q4. Give the preorder, inorder, and postorder expressions corresponding to
the tree.

Vous aimerez peut-être aussi