Multiple choice

Given four algorithms A, B, C, D with time complexities as follows: A-O(n) B-O(log log n) C-O(log n) D-O(1) where n > 1 Select the option, which gives the algorithms in increasing order of their time complexities.

  1. C B A D

  2. B C D A

  3. A D B C

  4. A D C B

  5. None of these

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

yes of the given time complexities the one with time O(log log n) is smallest because logarithm of a number is significantly small, here we are applying another logarithm which makes it much smaller, the next smaller will be O(log n) followed by O(n) and O(1) which makes it B C D A