CS301- Data Structures midterm
Page 1 of 1 • Share
CS301- Data Structures midterm
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
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- Y-Nots!
- Posts : 624
Join date : 2011-02-08
Re: CS301- Data Structures midterm
[You must be registered and logged in to see this image.]
Asad- Deep Bench
- Posts : 563
Join date : 2011-02-11
Re: CS301- Data Structures midterm
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.]
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- Deep Bench
- Posts : 563
Join date : 2011-02-11
Re: CS301- Data Structures midterm
[You must be registered and logged in to see this image.]
Admin- Y-Nots!
- Posts : 624
Join date : 2011-02-08
Re: CS301- Data Structures midterm
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.]
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- Y-Nots!
- Posts : 624
Join date : 2011-02-08
Similar topics
» CS301- Data Structures Assignment No. 4
» CS301- Data Structures finalterm paper
» CS301 Midterm Papers
» STRUCTURES
» CS301 GDB Solution
» CS301- Data Structures finalterm paper
» CS301 Midterm Papers
» STRUCTURES
» CS301 GDB Solution
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
Mon Nov 25, 2024 6:33 am by ali001
» Ellipsis News: Stay Informed
Sat Nov 23, 2024 2:01 pm by ali001
» Goorevi App
Thu Nov 21, 2024 6:50 pm by ali001
» AMERICA EARNS! - Gift Card App
Mon Nov 18, 2024 11:07 am by ali001
» Kanba - Manage your Tasks
Thu Nov 14, 2024 12:21 pm by ali001
» Hemangiom'App
Tue Nov 05, 2024 11:25 am by ali001
» MindfulMe - Mental Health App
Mon Nov 04, 2024 10:50 am by ali001
» Learn Candlestick Patterns
Tue Oct 15, 2024 5:51 am by ali001
» Woh Pagal Si Episode 52 to 62 - Top Pakistani Drama
Sat Sep 21, 2024 6:26 pm by Mir Emmad Ali Khan Domki