Wednesday, May 26, 2010

CS301 MID May 2010

Today Paper (26-05-2010)

 Total questions 23
MCQs = 16

2 Marks each
Q) Traverse following tree in In-order and Post-order
15
2 11
Q) What is function call stack.
Q) Differentiate b/w call by reference and call by value.

3 Marks each
Q) What normally is the sequence of operation while constructing an AVL Tree.
Q) Draw BST that is as tall as possible.
2, 6, 5, 4, 7, 9, 8

5 Marks each
Q) Write a recursive function in C++ that computes the number of leaves in a binary tree, We will pass pointer to root of the tree to that function in leaf count (Node * root).
{
…..
}

Q) Suppose that following is a balanced AVL Tree , Insert new node P into tree. Then the resulting tree may or may not remain balanced.
__diagram__
five option (yad nhi ab)

Another Paper 
MCQs 16

MCqs zyada tr linked list and stack mein say thay 3 or 4 Mcqs binary tree mein say thay


Q:1
Which process places data at the back of the queue? [2 Marks]
Q:2
Ho an AVL tree is differ from a Binary tree ? [2 Marks]
Q:3
Is this statement is Correct? Justify your Answer.
Statement: to find a node x in a binary search tree we have to make comparison at maximum equal to total number of nodes in the tree. [3 Marks]
Q:4
Write 2 cases in which double rotation of binary tree used. [3 Marks]
Q: 5
Draw an AVL tree by following digits 17, 18, 5, 15, 7, 11 and also perform necessary rotations, while showing all the intermediate trees being created in the process[5 Marks]
Q:6
Eik tree diya gya tha us mein in order and preorder form mein nodes ko likhna tha [5 marks].
 
Another Paper:-
Q) What is function call stack.
is ka yahi answer hai na kay
" when a function call is made the process is done in a stack. A function call stack holds the parameters, Local variables and the return address.."
Q) Draw BST that is as tall as possible.
2, 6, 5, 4, 7, 9, 8
is question ka kya matlab haiiiii...
matlab ka bst hi banani hai na..
The given are nodes Or the level limit. Ahat do we have to do in this question..
 

No comments:

Post a Comment