Question
Quick sort average time
complexitySolution
Quick Sort is a divide-and-conquer algorithm that works by selecting a 'pivot' element from the array and partitioning the other elements into two sub-arrays, according to whether they are less than or greater than the pivot. The sub-arrays are then sorted recursively.
- O(N log(N)) : This is the average time complexity of Quick Sort. The reason is that in an average case, the pivot divides the array into two nearly equal parts, and sorting each part takes O(log(N)) divisions, with each division taking O(N) time to partition the array.
- O(N) : This represents linear time complexity, which is not the case for Quick Sort.
- O(log(N)) : This represents logarithmic time complexity, which does not apply to sorting an array.
- O(N log(N*N)) : This is not a standard time complexity notation for sorting algorithms.
- none : This is incorrect because the average time complexity of Quick Sort is well-known to be O(N log(N)).
What should come in place of (?) question mark in the following number series.
4, 9, 19, 34, 54, ?
?, 15, 45, 225, 1575, 14175
62, 87, 137, ?, 312, 437
In each of the following number series, one term is missing. Find the missing term.
2, 6, 12, 20, ?, 42
A series given below follows a certain pattern,
1800, 469, (?), 855, 980, 953
If (?) = B – 2, then find the nearest cube root of B.
What will come in place of the question mark (?) in the following series?
9, 22, 61, ?, 217, 334
129, 224, 355, 528, ?, 1024
289    169      121       ?      25       9
...18, 30, 46, 66, 90, ?
Find the next term in the series:
3, 10, 21, 36, 55, ?