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)).
- Eight identical cubes of edge 4 cm are joined end to end. Calculate the total surface area of the solid formed.
A rectangular field has a perimeter of 82 meters, and the length of its diagonal measures 29 meters. Determine the area of the field.
A well with 30 metre inner diameter is dug 6 m deep. Earth taken out of it, has been evenly spread all around it to a width of 15 m to form an embankmen...
Three cubes of metal whose edge are 6cm, 8cm and 10cm. respectively are melted and a single cube is formed. What is the length of the edge of the newly...
A cuboidal box has a length of 15 cm, a width of 12 cm, and a height of 10 cm. A cylindrical hole of radius 3 cm and height equal to the cuboid is drill...
If perpendicular and base of a right-angle triangle are 24 cm and 32 cm respectively, then find the length of the shortest median of triangle.
A cylinder of radius 7 cm is surmounted completely by a cone of same radius. Height of cylinder is 6 cm. Find the height of cone if volume of entire sha...
A hemisphere has a total surface area of 604.8 cm². Calculate the volume of a sphere that has the same radius as the given hemisphere. (Take π = 3.15)...
- A metal sphere with radius 17.5 cm is melted and molded into small cuboids each of size 7 cm × 5 cm × 5 cm. Determine the number of cuboids formed.
Length and breadth of a rectangular field is (x + 6) cm and (x – 3) cm, respectively. If the cost of ploughing the field at a rate of Rs. 10 per cm² ...