📜  门| GATE-CS-2015(Set 2)|第65章

📅  最后修改于: 2021-06-28 23:54:52             🧑  作者: Mango

下面给出了一些算法和一些算法设计范例。

List-I
A. Dijkstra’s Shortest Path
B. Floyd-Warshall algorithm to compute all pairs shortest path
C. Binary search on a sorted array
D. Backtracking search on a graph

List-II
1. Divide and Conquer
2. Dynamic Programming
3. Greedy design
4. Depth-first search
5. Breadth-first search 

将左侧的上述算法与它们遵循的相应设计范式进行匹配

代码:

A B C D
(a) 1 3 1 5
(b) 3 3 1 5
(c) 3 2 1 4
(d) 3 2 1 5 

(一)
(B) b
(C) c
(D) d答案: (C)
解释:

Dijkstra’s Shortest Path is a Greedy Algorithm.

Floyd-Warshall algorithm is Dynamic Programming.

Binary search is a Divide and Conquer.

Backtracking is Depth-first search

这个问题的测验