Which of the following statements is TRUE about Quick Sort?
It always has a time complexity of O(n log n).
It is generally preferred over Merge Sort for arrays.
It is a stable sorting algorithm.
It performs poorly on already sorted arrays if the pivot selection is not optimized.
What is the main challenge in implementing a circular array?
Handling the resizing of the array
Determining the starting index of the array
Efficiently searching for elements in the array
Managing the wrap-around behavior correctly
Which of the following is NOT a characteristic of a stable sorting algorithm?
Always has a time complexity of O(n log n).
Suitable for sorting objects based on multiple criteria.
Can be implemented in both recursive and iterative forms.
Preserves the order of equal elements.
You are designing a system to store a large sparse matrix where memory usage is critical. Which approach is most suitable?
Use a dynamic array and resize it as needed.
Store the matrix in a text file and read it when needed.
Use a standard 2D array.
Implement the sparse matrix using a hash table.
You are given a sorted array and a target value to insert. Which algorithm offers the best time complexity for inserting the target value while maintaining the sorted order?
Linear Search
Binary Search
Bubble Sort
Quick Sort
What data structure is commonly used to implement a sparse array efficiently?
Linked List
Binary Tree
Hash Table
Queue
Which of the following is NOT a valid approach for array rotation?
Merge Sort Algorithm
Juggling Algorithm
Block Swap Algorithm
Reversal Algorithm
You want to search for a target value in a sorted array with millions of elements. Which algorithm would generally be the fastest?
Interpolation Search
Jump Search
You are searching for a target value in a 2D matrix where each row and column is sorted in ascending order. Which search algorithm is the most efficient?
Breadth First Search
Binary Search on each row
Staircase Search
In the context of searching algorithms, what does the term 'adaptive' refer to?
Algorithms that can handle unsorted data.
Algorithms that adjust their strategy based on previous search results.
Algorithms that use divide-and-conquer techniques.
Algorithms with a constant time complexity.