Question
Which all statements are correct about
SortingSolution
Option 5: only b and d Explanation
- Bubble sort has O(n^2) as best case time complexity
- This statement is incorrect . The best case time complexity for Bubble Sort is O(n) , which occurs when the array is already sorted. In such cases, Bubble Sort can detect the sorted array early and terminate.
- Selection sort has O(n^2) as best case time complexity
- This statement is correct . Selection Sort always has a time complexity of O(n^2) , regardless of the initial ordering of the elements. This is because it always goes through the entire list to find the minimum element for each position.
- Insertion sort has O(n^2) as best case time complexity
- This statement is incorrect . The best case time complexity for Insertion Sort is O(n) , which occurs when the array is already sorted. In such cases, each insertion requires only one comparison.
- Radix sort has O(n+K) as best case time complexity
- This statement is correct . Radix Sort has a time complexity of *O(d(n + k))**, where d is the number of digits in the largest number and k is the range of the digit (base of the number system). In many cases, it is simplified to O(n + k) if the number of digits d is considered a constant.
- Selection Sort has O(n^2) as its best case time complexity.
- Radix Sort has O(n + k) as its best case time complexity
Two dice are thrown simultaneously. Find the probability that sum of the numbers appeared on both the dice is at least 7.
A bag contains 5 green gems and 7 orange gems. If 2 balls are drawn random, then what is the probability that at least 1 gem is orange.
In a bag contains 4 one rupees coins and 3 five rupees coin. If two coins are drawn at random, find the probability of getting a one rupee coin and a fi...
A company wants to pack 144 small boxes, 216 medium boxes, and 288 large boxes into cartons such that each carton contains the same number of boxes of e...
A bag contains 5 red bottles, 6 yellow bottles and 8 green bottles . 3 bottles are drawn randomly. What is the probability t...
A box holds 8 green balls, 7 blue balls, and 5 yellow balls. Three balls are picked randomly. What is the probability that at least two balls are blue?
- 5 boys and 3 girls are to be seated on chairs arranged in a row. If the arrangement is made at random, find the probability that no two girls will be seate...
A box contains (x + 10) pencils, (x + 15) pens, and (x + 20) markers. The probability of drawing a marker from the box is (2/5). Find the number of pens...
A bag contains 15 black balls, 25 white balls, and 20 yellow balls. If three balls are drawn at random with replacement, what is the probability of draw...
Ten tickets numbered 1 to 15 are placed in a box, mixed up thoroughly and then one ticket is drawn randomly. If it is known that the number on the drawn...