Algorithm Time Complexity Analysis
Test your knowledge of time complexity analysis using recurrence relations and algorithmic complexity for algorithms like Kruskal's and Prim's
Questions
Directions: Find the time complexities of the following question.
T(n)=3T(n/4)+c(n2)
- O(n2)
- O(n log n)
- O(n)
- O(log n)
Directions: Find the time complexities of the following question.
T(n)=(n - 1)+n
- O(n2)
- O(n log n)
- O(n)
- O(log n)
Directions: Find the time complexities of the following question.
T(n)=2T(n/2)+c
- O(n2)
- O(n log n)
- O(n)
- O(log n)
Directions: Find the time complexities of the following question.
T(n)= 2T(n/2)+n
- O(n2)
- O(n log n)
- O(n)
- O(log n)
Directions: Find the time complexities of the following question.
T(n)=2T(n/2+17)+O(n)
- O(n2)
- O(n log n)
- O(n)
- O(log n)
Directions: Find the time complexities of the following question.
T(n)=T(n/3)+T(2n/3)+O(n)
- O(n2)
- O(n log n)
- O(n)
- O(log n)
Directions: Find the time complexities of the following question.
T(n)=3T(n/4)+nlogn
- O(n2)
- O(n log n)
- O(n)
- O(log n)
Directions: Find the time complexities of the following question.
T(n)=9T(n/3)+n
- O(n2)
- O(n log n)
- O(n)
- O(log n)
Directions: Find the time complexities of the following question.
T(n)=T(2n/3)+1
- O(n2)
- O(n log n)
- O(n)
- O(log n)
Directions: Find the time complexities of the following question.
T(n)=T(n-1)+1/n
- O(n2)
- O(n log n)
- O(n)
- O(log n)
Directions: Find the time complexities of the following question.
T(n)=4T(n/2)+n2√n
- O(n2√n)
- O(n log n)
- O(n)
- O(log n)
Directions: Find the time complexities of the following question.
T(n)=2T(n/2)+n/logn
- O(n2)
- O(n log n)
- O(n)
- O(nloglog n)
Directions: Find the time complexities of the following question.
T(n)=T(n/2)+T(n/4)+T(n/8)+n
- O(n2)
- O(n log n)
- O(n)
- O(log n)
Directions: Find the time complexities of the following question.
T(n)=3T(n/2)+nlogn
- O(n2)
- O(nlog 3)
- O(n)
- O(log n)
Directions: Find the time complexities of the following question.
T(n)=T(n-1)+logn
- O(n2)
- O(n log n)
- O(n)
- O(log n)
Directions: Find the time complexities of the following question.
T(n)=T(n-2)+2logn
- O(n2)
- O(nlog3)
- O(n)
- O(log n)
Directions: Find the time complexities of the following question.
T(n)=2T(√n)+logn
- O(n2)
- O(nlog3)
- O(lognloglogn)
- O(log n)
Directions: Find the time complexities of the following question.
T(n)=2T(n-1)+1
- O(n2)
- O(nlog3)
- O(2n)
- O(log n)
The time required by Kruskal's algorithm is _____.
- O(|E|log|V|)
- O(VlogE)
- O(EV)
- O(log V)
The time required by Prim's algorithm is ______.
- O(|V|2)
- O(VlogE)
- O(EV)
- O(log V)
Directions: Find the time complexities of the following question.
T(n)=T(n-1)+n+c
- O(n2)
- O(nlog3)
- O(2n)
- O(log n)
In Prim's algorithm, it will be reduced to _________ if heap is used to keep.
- O(|E|log|V|)
- O(VlogE)
- O(EV)
- O(log V)
Directions: Find the time complexities of the following question.
2T(n/2)+n2
- O(n2)
- O(nlog3)
- O(2n)
- O(log n)
Directions: Find the time complexities of the following question.
T(n)=T(n/4)+2T(n)+n2
- O(n2)
- O(nlog3)
- O(2n)
- O(log n)
Directions: Find the time complexities of the following question.
T(n)=2T(√n)+nlogn+n
- Ω(n2)
- Ω(nlog3)
- Ω(2n)
- None of these