Tuesday 14 June 2011

CS301 Data Structures Current Mid Term Papers May 2011, (Spring 2011) Posted by M.Tariq Malik on May 12, 2011 at 6:19am in CS301 Data Structures Read more: CS301 Data Structures Current Mid Term Papers May 2011, (Spring 2011)


CS301(Data Structure )
My Todays Paper


Most of the MCQs were  from the binary search tree and Queue and the concept of synatx current node , next current nodes

Q1- Write down the functions of Binary search tree
Q2- Draw an AVL Tree of 17,18,5,15,7 and also do rotations to balance it if necessary.
Q3-In which case the double rotations of AVL is applied
Q4-Make a BST of the following:
   2, 4,5,8,14,35,9,
Q5- Delete following nodes from binary tree :
29,35,75,60


Read more:


CS301-Mid-term-Spring-2011-Paper-12-05-2011
See the attached file please 


Attachments:






Read more
Cs301 Subjective

1. What is function of length () method in the Aueue
2. Explain the two cases in which we apply double roation in An Avl tree
3. how can we perform level -order travessal on a tree
4. How can the dangling reference problem be avoided
supose we have these value 16,27,23,10,,38

Read more

Q.21: - How AVL is different from Binary Search Tree?
Q.22: - What the maximum no of comparisons we have to perform during insertion in BST?
Q.23: - We have a list of 1, 2, 3, 4 numbers. Their inorder traversal is 2, 1, 4, 3 and post order is 2, 4, 3, 1. What will be its root at level 0.
(a). 1 (b) 2 © 3 (d) 4 (e) none

Q.24: -(a). Write C++ statement that declares a valid reference of int i.
(b). What are the benefits of reference?
Q.25: - There is a BST, who root is 70 its left 65 right 74, left of 65 is 50 & right 67, left of 50 is null & right is 57, & back left of 67 is null & right 69 and right of root 70 is 74, left of 74 is 72 & right is 77, left of 72 is null & right 73 and back to 77, left of 77 is null and right is 80.
I wrote all this because tree is not made by me...
write its Prefix and infix traversal.

Q.26: - write the details of given statements.
(a). int x;
int * y = & x;
(b). int x;
int &y = x;
©. int x;
int y = x;

Read more:



2 questions of 5 marks

a) a BST was given, the question is to do pre order and post order traversal

b) an AVL tree was given, the question was to find the balance factor of each noTe

1. What is function of length () method in the Aueue
2. Explain the two cases in which we apply double roation in An Avl tree
3. how can we perform level -order travessal on a tree
4. How can the dangling reference problem be avoided
supose we have these value 16,27,23,10,,38

Q.21: - How AVL is different from Binary Search Tree?
Q.22: - What the maximum no of comparisons we have to perform during insertion in BST?
Q.23: - We have a list of 1, 2, 3, 4 numbers. Their inorder traversal is 2, 1, 4, 3 and post order is 2, 4, 3, 1. What will be its root at level 0.
(a). 1 (b) 2 © 3 (d) 4 (e) none

Q.24: -(a). Write C++ statement that declares a valid reference of int i.
(b). What are the benefits of reference?
Q.25: - There is a BST, who root is 70 its left 65 right 74, left of 65 is 50 & right 67, left of 50 is null & right is 57, & Paper copy from vu thirty nine dot com back left of 67 is null & right 69 and right of root 70 is 74, left of 74 is 72 & right is 77, left of 72 is null & right 73 and back to 77, left of 77 is null and right is 80.
I wrote all this because tree is not made by me...
write its Prefix and infix traversal.

Q.26: - write the details of given statements.
(a). int x;
int * y = & x;
(b). int x;
int &y = x;
©. int x;
int y = x;


These were the detailed questions of todays 12-05-2011 CS301 papers.

2 questions of 3 marks


1. What is function of length () method in the Queue
2. Explain the two cases in which we apply double roation in an AVL tree

Read more:





See the attached file



Attachments:






Read more

How AVL is different from Binary Search Tree?
-----------------------------
A BST was given, the question is to do pre-order and in-order traversal.
-----------------------------
 The data of the problem is of 2GB and the hard disk is of 1GB capacity, to solve this problem we should 
       ►  Use better data structures
       ► Increase the hard disk space 
       ► Use the better algorithm 
       ►  Use as much data as we can store on the hard disk 
-----------------------------
Four statements about trees are below. Three of them are correct. Which one is INCORRECT?
       ► Trees are recursively defined multi-dimensional data structures
       ► The order of a tree indicates a maximum number of childen allowed at each node of the tree
       ► A search tree is a special type of tree where all values (i.e. keys) are ordered
       ► If Tree1's size is greater than Tree2's size, then the height of Tree1 must also be greater than Tree2's height.
---------------------
Tree data structure is a ________
    a. Linear
    b. Non Linear
    c. Circular
    d. None of Above
---------------------
Define...
Reference Variable
Dangling Reference
Const keyword
 ------------------------------
What is tree?

No comments:

Post a Comment