Which of the given options provides the increasing order of asymptotic complexity of f1, f2, f3 f4 functions and ? f1(n) = 2n A. f2(n) = n3/2 B. f3(n) = n log n C. f4(n) = nlog n D.
Pick an option to check yourself, or open the answer below.
Show answer & explanation
Correct answer: A. C, B, D, A
Explanation
n log n < n^(3/2) < n^(log n) < 2ⁿ (n^(log n) = 2^((log n)²) grows slower than 2ⁿ). So C, B, D, A.
More Data Structures and Algorithms questions
- A hash function h(key) = key mod 7 with linear probing is used to insert the keys 44, 45, 79, 55, 91, 18, 63 into a table indexed 0 to 6. W…
- Match each graph algorithm with its time complexity (n vertices, m edges). List I: A. Bellman-Ford, B. Kruskal's algorithm, C. Floyd-Warsha…
- The reverse Polish notation of the infix expression [A * {B + C * (D + E)}] / {F * (G + H)} is
- With preconditions a > 1 and a < b (no overflow): int x = 0; int p = 1; while (p < b) { p = p * a; x = x + 1; } When the loop ends, x in te…
- A complete -ary tree is a tree in which each n I node has children or no children. Let be the L number of internal nodes and be the number…
- In a binary max heap containing numbers, the smallest element can be found in ____ time.