Question: Data Structures IN JAVA Multiple Choice For each question, select the best answers that apply. More than one answer can be circled and D is
Data Structures IN JAVA Multiple Choice
For each question, select the best answers that apply. More than one answer can be circled and D is always going to be None of the above. This means no question will have multiple answers with D selected (such as A and D). The minimum to circle is at least one answer and the most would be A, B and C.


1) Which of the following statements is/are true about Big-O? a. Big-O measures the performance of your algorithm as the number of elements in the data set it is working with increases in size b. One example of an O(n) algorithm is that if a list has 1000 elements performing 2000 comparisons, then if the list had 3000 elements, it would perform about 4000 comparisons c. If algorithm 1 performs at a better Big-O category than algorithm 2, then algorithm 1 will eventually have better performance than algorithm 2 as more items are added to the data structure d. None of the above 2) With a stack implemented as a linked list, which of the following is true? a. Push performs at O(1) when the append function for a linked list is used b. Pop performs at O(1) when the general delete function for a linked list is used c. Top (looking at what's on top of the stack) performs at O(n) when showing what the head node value is d. None of the abovee 3) Which of the following is true about using a 2-3-4 tree? a. The purpose of using a 2-3-4 tree is to ensure that the tree structure is b. If delete is handled by marking data items as deleted, then the algorithm to c. The split function is performed during insert when a leaf node is visited and d. None of the above balanced no matter how many inserts are performed remove all elements marked for deletion and rebuilding the tree is O(n) its data items list is full 4) Which of the following is true when comparing arrays and linked lists? a. With sorted data, delete between the 2 data structures performs in the same O category in the worst case b. One of the advantages with arrays over linked lists is dynamic memory usage c. If the data is unsorted, append between the 2 data structures performs in the same O category in the worst case d. None of the abovee 5) Which of the following is true about the delete function of a binary search tree? a. If the node to delete has two children, the successor node is found by looking for the smallest value in the right subtree of the node to be removed b. If the node is found to delete, the node to delete will be in 1 of 3 unique situations: one child, two children or is a leaf c. The delete function will perform at O(n) if all the elements of the tree only have child nodes on the right d. None of the above 6) Which of the following is true about how recursion functions work? a. If you think of the function execution performing like a loop, the base case represents the condition where if true, the loop stops
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
