What is the time complexity of deleting a given value from an unsorted array in the worst case?
O(n)
O(n log n)
O(1)
O(log n)
Which data structure is most suitable for implementing a sorted array with efficient insertion and deletion operations?
Array
Stack
Queue
Linked List
What is the time complexity of searching for a target value in a sorted array using binary search?
Which of the following algorithms guarantees finding the target element in a sorted array if it exists?
Both Linear Search and Binary Search
Binary Search
Linear Search
Interpolation Search
You need to implement a buffer that stores a fixed number of recent data points, discarding older data as new data arrives. Which array-based structure would be most appropriate?
Circular array to efficiently manage the fixed-size buffer
Standard array with shifting elements on each insertion
Dynamic array (ArrayList, vector) to accommodate varying data sizes
Sparse array to handle potentially sparse data
Which of the following statements is TRUE about Quick Sort?
It is generally preferred over Merge Sort for arrays.
It performs poorly on already sorted arrays if the pivot selection is not optimized.
It is a stable sorting algorithm.
It always has a time complexity of O(n log n).
You want to search for a target value in a sorted array with millions of elements. Which algorithm would generally be the fastest?
Jump Search
What data structure is commonly used to implement a sparse array efficiently?
Binary Tree
Hash Table
What is the main challenge in implementing a circular array?
Efficiently searching for elements in the array
Determining the starting index of the array
Handling the resizing of the array
Managing the wrap-around behavior correctly
What is the primary data structure used in Heap Sort?
Binary Heap