CS301 GDB NO.1 2020
Solution 1
Keeping in view of the above given scenario. Our main concern is to store the test scores at a one
place and retrieve the test scores efficiently. Being a most senior developer. I will recommend
the AVL Tree Data Structure to the CEO of XYZ soft on the grounds that AVL tree data
Structure is a powerful tool for organizing data objects. The main advantage of using AVL tree is
its time complexity. You can perform insertion or searching operation in o(log(n)) time so the
data retrieval rate is also fast as compared to binary search tree. It is equality useful for
organizing multiple data objects like that of hierarchical relationships.
Solution 2
As a computer programmer keeping in mind the whole situation where we are going to insert
sorted data in ascending order, I think we should use a balanced binary tree such as an AVL
(Adelson-Velskii and Landis) tree, because our main concern is to increase the retrieval
efficiency for BST. AVL Trees are best choice in scenarios where there are frequent data
searching queries rather than a situation requiring frequent insertions and deletions. In the worst
case scenario we have to search 1.44 log2n levels while searching an AVL tree. For searches,
binary and AVL trees are the most efficient trees, so its best choice.
Comments
Post a Comment