CIT 594 Final Exam
1. AVL Tree - ANS-a self-balancing sorted binary tree, in which the heights of subtrees
range by using at maximum 1.
2. How does a queue operate? - ANS--provides to the rear and eliminates from the the
front
3. -It is a linked list that is first in first out
4. How does a stack function? - ANS--consider a stack as literally a stack of bricks
however each element incorporates statistics
5. -It is a linked list this is remaining in first out
6. How is the bucket quantity calculated for a hash set ? - ANS-hashcode %
number_of_buckets
7. How a whole lot time do rotations take for self balancing BST's? - ANS-O(1)
8. Max Heap - ANS-a whole binary tree in which the cost in every inner node is extra
than or equal to the values of the children in those nodes(Note* NOT the SUM, just
each person price)
9. Tree Set - ANS-A set interface that makes use of a tree for garage
10. True/False, BSTs have best precise elements and preserve their factors so as? -
ANS-TRUE
11. What are the 4 guidelines of a crimson black tree? - ANS-1) Each node is coloured
crimson or black
12. 2) all null nodes are colored black
13. three) each crimson node has black infant nodes
14. four) Every direction from any node to any null node ought to have the equal wide
variety of black nodes. This is called the "black-top" of the tree
15. What does the manufacturing facility approach do? - ANS-For the factory method
sample, we need to outline an abstract elegance that subclasses can use to go back
subclasses of the dependency
16. What does UML stand for? - ANS-Unified Modeling Language
17. What in standard, is the time complexity for searching a BST? - ANS--O(h) where h
is the height, however O(n) in the worst case !
18. -For balanced timber, h=O(logn)
19. What is a race circumstance with regard to Threads? - ANS-When you dont know
what thread will finish first, so therefore the threads are "racing" against every
different and you've thread non determinism... (now not appropriate)
20. What is an AVL tree and why is it named AVL? - ANS--Its named AVL after its
inventors Adelson-Velsky and Landis
21. -It is a self balancing binary seek tree
22. What is the time complexity for all self balancing BSTs? - ANS-O(log₂n )
23. what's the time complexity of a single for loop? - ANS-O(n)
24. What is the time complexity of related listing's get operation? - ANS-O(n)
1. AVL Tree - ANS-a self-balancing sorted binary tree, in which the heights of subtrees
range by using at maximum 1.
2. How does a queue operate? - ANS--provides to the rear and eliminates from the the
front
3. -It is a linked list that is first in first out
4. How does a stack function? - ANS--consider a stack as literally a stack of bricks
however each element incorporates statistics
5. -It is a linked list this is remaining in first out
6. How is the bucket quantity calculated for a hash set ? - ANS-hashcode %
number_of_buckets
7. How a whole lot time do rotations take for self balancing BST's? - ANS-O(1)
8. Max Heap - ANS-a whole binary tree in which the cost in every inner node is extra
than or equal to the values of the children in those nodes(Note* NOT the SUM, just
each person price)
9. Tree Set - ANS-A set interface that makes use of a tree for garage
10. True/False, BSTs have best precise elements and preserve their factors so as? -
ANS-TRUE
11. What are the 4 guidelines of a crimson black tree? - ANS-1) Each node is coloured
crimson or black
12. 2) all null nodes are colored black
13. three) each crimson node has black infant nodes
14. four) Every direction from any node to any null node ought to have the equal wide
variety of black nodes. This is called the "black-top" of the tree
15. What does the manufacturing facility approach do? - ANS-For the factory method
sample, we need to outline an abstract elegance that subclasses can use to go back
subclasses of the dependency
16. What does UML stand for? - ANS-Unified Modeling Language
17. What in standard, is the time complexity for searching a BST? - ANS--O(h) where h
is the height, however O(n) in the worst case !
18. -For balanced timber, h=O(logn)
19. What is a race circumstance with regard to Threads? - ANS-When you dont know
what thread will finish first, so therefore the threads are "racing" against every
different and you've thread non determinism... (now not appropriate)
20. What is an AVL tree and why is it named AVL? - ANS--Its named AVL after its
inventors Adelson-Velsky and Landis
21. -It is a self balancing binary seek tree
22. What is the time complexity for all self balancing BSTs? - ANS-O(log₂n )
23. what's the time complexity of a single for loop? - ANS-O(n)
24. What is the time complexity of related listing's get operation? - ANS-O(n)