Virtual Position Forum
Please register to watch content in detail
Thanks
Admin virtual position


Join the forum, it's quick and easy

Virtual Position Forum
Please register to watch content in detail
Thanks
Admin virtual position
Virtual Position Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

CS301- Data Structures midterm

View previous topic View next topic Go down

GMT + 3 Hours CS301- Data Structures midterm

Post by Admin Thu May 12, 2011 7:09 pm

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 node
Admin
Admin
Y-Nots!
Y-Nots!

Posts : 624
Join date : 2011-02-08

Back to top Go down

GMT + 3 Hours Re: CS301- Data Structures midterm

Post by Asad Thu May 12, 2011 7:10 pm

[You must be registered and logged in to see this image.]
Asad
Asad
Deep Bench
Deep Bench

Posts : 563
Join date : 2011-02-11
Creative

Back to top Go down

GMT + 3 Hours Re: CS301- Data Structures midterm

Post by Asad Thu May 12, 2011 7:10 pm

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

[You must be registered and logged in to see this link.]
Asad
Asad
Deep Bench
Deep Bench

Posts : 563
Join date : 2011-02-11
Creative

Back to top Go down

GMT + 3 Hours Re: CS301- Data Structures midterm

Post by Admin Thu May 12, 2011 7:17 pm

[You must be registered and logged in to see this image.]
Admin
Admin
Y-Nots!
Y-Nots!

Posts : 624
Join date : 2011-02-08

Back to top Go down

GMT + 3 Hours Re: CS301- Data Structures midterm

Post by Admin Thu May 12, 2011 7:18 pm

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 (c) 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 virtualposition dot forumotion dot net 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;
(c). int x;
int y = x;


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


[You must be registered and logged in to see this link.]
Admin
Admin
Y-Nots!
Y-Nots!

Posts : 624
Join date : 2011-02-08

Back to top Go down

GMT + 3 Hours Re: CS301- Data Structures midterm

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

Permissions in this forum:
You cannot reply to topics in this forum