Which of the following choices best describes the worst case time complexity for a single remove operation in a general LIST with N elements, implemented as linked cells?
What is the worst case time complexity for a single delete operation in a BST containing N elements (with no balancing being done)?O(N)What is the average case time complexity for a single find operation in a BST containing N elements (with no balancing being done)?O(log N)What is the average case time complexity for an post-order traversal in a BST containing N elements (with no balancing being done)?O(N)Let's add an operation to the ADT STACK. The operation is max, and it will return the largest element stored in the stack. If we implement a STACK with an array, which of the following expressions gives the most accurate description of the worst case time complexity of the max operation? Choose an implementation that is as efficient as you can imagine. We want the normal STACK ops (like push, pop, etc) to stay as efficient as they are without max implemented (in theoretical Big-Oh terms). You may use more space if you wish, such as more than one array or some other variables, or some supporting data structures like LIST or whatever you can think of, but it must work for a general case . Also, only use data structures we studied for this exam.O(1)For any set of unique data elements, if we insert these elements into an empty BST in different orders, we still get the same final BST structure. T/FFalseConsider two functions, where both compute the same results. One is recursive (and uses no loops), whereas the other is iterative (uses loops and no recursion). In practical terms (when the code is executed) both programs will succeed in producing correct and identical results. T/FFalseThe run-time stack is static memory where the compiler lays out one memory frame for each method and function that is written in the source code. T/FFalseAn N-ary tree is a tree with every node (except leaves) having exactly N children. T/FFalseEvery program that uses loops (and no recursion) to compute a result can be rewritten to use recursion (and no loops) to compute the same result. T/FTrueIf algorithm P has worst case time complexity O(log N) then P also has worst case time complexity of O(2^N). T/FTrueThe principle of time/space trade off says that an algorithm for processing a data structure cannot be both fast (very efficient execution relative to problem size) and memory stingy (use very small amounts of memory relative to data structure size). T/FFalseGarbage collection in Java makes it impossible to run out of heap space during execution. T/FFalseWhich of these choices best describes what happens when a Java program makes a call to "new" to make a new object?Unallocated space from the heap is allocated for the new object and a pointer is stored in a run time stack frame as well to reference the newly allocated memory blockAll memory used in a Java program is dynamically allocated, at run time. T/FFalseWhat is the worst case time complexity to sort N items if we use a LIST with the insort operation? Recall that insort locates the proper place in the list for the new element, so that the list begins in order, and remains in order when the insort is complete.O(N^2)What of the following choices best describes the average case time complexity to sort N items if we use bubble sort?O(N^2)Which of the following choices is the best description of the worst case time complexity to sort N items if we use a BST that is not being balanced? This means we start with an empty BST and repeatedly add the items we need to sort. and then do a traversal to get the elements out in order.O(N^2)What is the average case time complexity to sort N items if we use a basic BST (that is not being balanced)?O(N log N)What is the maximum number of nodes that might be in a complete binary tree with height H, if we also have that the tree is not a perfect binary tree2^(H+1) - 2Consider a collection of unique data values (let's say, integers) and let's also say that the collection has at least 10 elements in it. Also consider building a basic Binary Search Tree from these values by starting with an empty tree and inserting the values into the tree one at a time in some order. True or false: it is possible for two different insertion sequences to produce the same BST structure.TrueConsider this way to sort. You are given R integers in an array, the data source array. You are also told that the integer values are in the range 0 to M inclusive, that there are no duplicate values, and that R < M. To sort the source data values smallest to largest, you build another array of boolean with subscripts 0 to M. You set every element in the boolean array to false. You go through the data source array and for each element, you use the integer value stored there as a subscript into the boolean array, and mark that slot true. Finally, to get the sorted sequence, you go through the boolean array from subscript 0 up and print the subscript for every element that contains true. Which of the following expressions is the best description of the worst case time complexity for this sort:O( R + 2M )