Which of the shortest path algorithms would be most appropriate for finding paths in the graph with negative edge weights and cycles?
I.Dijkstra's Algorithm
II. Bellman-Ford Algorithm
III. Floyd Warshall Algorithm?
a) Only I
b) Only
c) II) Only III
d) Both II & III
Which of the following statement(s) is/are correct?
a) O(n log n + n2) = O(n2)
b) O(nlogn+n2) = O(n2 log 2n) O
c)(c n2) = O(n2) where c is a constant
d) O(cn2) = 0©
where c is a constant € 0© = O(1) where c is a constant?
a) Only (a) & (c)
b) Both (c) and (e)
c) All of these
d) None of these
Which of the following arrays represent descending (max) heaps?I. [10,7,7,2,4,6] II. [10,7,6,2,4,7] III. [10,6,7,2,4,6] IV. [6,6,7,2,4,10]?
a) Only II
b) Only IV
c) Both II and IV
d) Both I and III
Which statement is true
(1) The running time of Bellman-Ford algorithm is T (VE)
(II) Both Dijkstra's algorithm and Bellman-Ford are based on performing repeated relaxations
(III) The 0-1 knapsack problem is hard to solve?
a) Only I
b) Only III
c) Both I and III
d) All of these
If a problem is NP-complete, it must also be in NP?
a) True
b) False
c) NA
d) N/A