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
How is M related to J?
How is M related to P’s mother?
- Ankita is sister of the son of Gautam. Deepak’s wife is mother of Suravi. Lata is grandmother of Suravi. There are two married couple in the family. How ...
How is P related to mother of S?
In a family of eight persons with three couples, Q is the son of R and brother of S. T is the daughter in law of U and is married to S. W is the mother...
Bedi, Dinesh, Fana, Hema, Gita, Ojas, Tejas, and Wisha are eight family members. Bedi is the brother of Gita. Tejas is the son of Wisha. Ojas is the son...
Answer the questions based on the information given below.
There are seven members S, T, U, V, W, Y and Z, in a family of three generation. V i...
A man said to a lady, “Your mother’s husband’s sister is my aunt.” How is the lady related to the man?
How is A related to V?
How is C related to D?