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)).
The HCF of two numbers is 12. Which one of the following can never be their LCM?
Two numbers are in the ratio 3:5 and their HCF is 20. Their LCM is
The maximum number of students among whom 891 pens and 810 pencils can be distributed in such a way that each student gets same number of pens and same ...
A baker has four different varieties of cookies in quantities of 540, 720, 810, and 630. He wishes to pack these cookies such tha...
Ratio of two numbers 8:15 and their LCM is 2400. Find the sum of the given two numbers.
The greatest number of four digits which when divided by 5, 7, 9 leave remainders 3, 5, 7 respectively is:
If total number of factors of 3,240 is 'x', then find the value of (x - 3)(x + 5).
The LCM of two natural numbers is 12 times their HCF. If the product of given two numbers is 432, then find the LCM of the numbers.Â
If the sum of 2 numbers is 185, their LCM is 1700 and HCF is 5. Then the difference between 2 numbers is: