Qus : 1
WB JECA MCA PYQ
4
Find out the wrong statement based on the characteristics of AVL tree data structure.
1
AVL tree is a binary search tree in nature.
2
AVL tree is known as height-balanced tree. 3
AVL tree has O(log₂ n) search time complexity considering ‘n’ as number of nodes. 4
AVL tree has O(n) search time complexity considering ‘n’ as number of nodes. Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2023 PYQ
Solution AVL trees guarantee O(log n) search time, not O(n).
Qus : 6
WB JECA MCA PYQ
3
Which of the given statement is the correct recurrence for the worst case of Binary Search?
1
T(n) = 2T(n/2) + O(1) & T(1)=O(1)=T(0) 2
T(n) = T(n-1) + O(1) & T(1)=O(1)=T(0) 3
T(n) = T(n/2) + O(1) & T(1)=T(0)=O(1) 4
T(n) = T(n-2) + O(1) & T(1)=O(1) Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2024 PYQ
Solution
Solution: Binary search recurrence is T(n) = T(n/2) + O(1) . Base case T(1)=O(1).
Answer: (C) T(n) = T(n/2) + O(1)
Qus : 8
WB JECA MCA PYQ
3
Numbers 7, 5, 1, 8, 3, 6, 0, 9, 4, 2 are inserted in that order into an initially empty binary search tree. The tree uses usual ordering. What is the in-order traversal sequence?
1
7, 5, 1, 0, 3, 2, 4, 6, 8, 9 2
0, 2, 4, 3, 1, 6, 5, 9, 8, 7 3
0, 1, 2, 3, 4, 5, 6, 7, 8, 9 4
9, 8, 6, 4, 2, 3, 0, 1, 5, 7 Go to Discussion
WB JECA MCA Previous Year PYQ
WB JECA MCA JECA MCA 2024 PYQ
Solution
Solution: In-order traversal of a BST gives the sorted order of keys ⇒ 0 to 9 ascending.
Answer: (C) 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
[{"qus_id":"12680","year":"2024"},{"qus_id":"12682","year":"2024"},{"qus_id":"12685","year":"2024"},{"qus_id":"12704","year":"2024"},{"qus_id":"12706","year":"2024"},{"qus_id":"12708","year":"2024"},{"qus_id":"12710","year":"2024"},{"qus_id":"12796","year":"2023"},{"qus_id":"12797","year":"2023"},{"qus_id":"12798","year":"2023"},{"qus_id":"12799","year":"2023"},{"qus_id":"12800","year":"2023"},{"qus_id":"12801","year":"2023"},{"qus_id":"12802","year":"2023"},{"qus_id":"12803","year":"2023"},{"qus_id":"12808","year":"2023"}]