Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Data Structures of Java 1. Which of these statements about binary search is true? a. Searching a sorted array is O( logn). b. Searching an
Data Structures of Java
1. Which of these statements about binary search is true? a. Searching a sorted array is O( logn). b. Searching an unsorted array is O( log n) c. Searching a sorted linked list is as efficient as searching a sorted array. d. On each pass one element in the list is eliminated 2. The method for adding an element to the back of a queue is called a. push b. enqueue c. add d. none of the above 3. Given a linked list containing the following values: first 5 15 20 null, which of the following best describes what needs to happen when 10 is added to the list? a. The node containing 5 must be changed to point to the node which contains 10. Then the node containing 10 can be added. b. The value from the first node (10) is copied over the value 5. Then the first node is deleted. Then first is set to the node that now contains 10. c. Create a node and place 10 in that node and then make first to point to the node containing 10. d. None of the above 4. Linear probing a. is used to insert values into a doubly linked list. b. is a method of resolving collisions which uses chaining in a hash table. c. is used only when we want to insert an item in the array. d. none of the above 5. A data structure which exhibits FIFO behavior is known as a. An array. b. A Queue. c. A vector. d. None of the above. 6. The worst-case performance of quick sort for n items is a. O(log n) o(n) b. c, O(n log n) d, o(na) e. None of the above 7. In an array-based implementation of a queue, a possible solution to dealing with the full condition is to Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started