Arrange the following in the ascending order of their time complexity.
(A) Worst Case of Linear Search
(B) Best Case of Binary Search
(C) Worst Case of Binary Search
(D) Worst Case of Bubble Sort
Choose the correct sequence from the options given below:
To arrange the given algorithms by their time complexity, we consider the following complexities for each case:
Now, we arrange these complexities in ascending order:
Therefore, the sequence in terms of their time complexities from the smallest to the largest is: (B), (A), (C), (D)
The correct ascending order of time complexity is (B), (A), (C), (D).
Additional Context:
Correct Answer: (3) (B), (A), (C), (D).
The following data shows the number of students in different streams in a school:
Which type of graph is best suited to represent this data?
What comes next in the series?
\(2, 6, 12, 20, 30, \ ?\)