(A) BFS
(B) DFS
(C) Level order
(D) BFS and DFS both are valid
Tag: Fundamentals of Computer Algorithms
You have an adjacency list for G, what is the time complexity to compute Graph transpose G^T.?
(A) (V+E)
(B) ? (V E)
(C) ? (V)
(D) ? (V^2)
In digraph G=(V,E) ;G has cycle if and only if?
(A) The DFS forest has forward edge
(B) The DFS forest has back edge
(C) The DFS forest has both back and forward edge
(D) BFS forest has forward edge
Consider the following Algorithm: Factorial (n){ if (n=1) return 1 else return (n * Factorial(n-1)) { Recurrence for the following algorithm is:
(A) T(n) = T(n-1) +1
(B) T(n) = nT(n-1) +1
(C) T(n)= T(n-1) +n
(D) T(n)=T(n(n-1)) +1
The problem with the brute-force algorithm is that it uses __ in pruning out decisions.
(A) intelligence
(B) no intelligence
(C) NA
(D) NA
We introduced a brute-force algorithm that ran in __.
(A) O(n) time
(B) O(n^2) time
(C) O(nlogn) time
(D) O(n^3) time
A point p is said to dominated by point q if p.x ≤ q.x and p.y ≤ q.y?
(A) True
(B) False
(C) NA
(D) NA
We write out the loops as summations and then solve the summations?
(A) True
(B) False
(C) NA
(D) NA