题目
题目
单项选择题

Match the computational problem with the most appropriate algorithm that can be used to solve it. Do two student essays share a common phrase consisting of a sequence of more than 100 letters? Given the airports at which an airline operates and the distances between those airports, what is the shortest total flight distance between two airports? Given a sorted array of a company's employee records and an employee's first and last name, what is a specific employee's phone number?

选项
A.A)1 - Binary Search2 - Shortest Path Algorithm3 - Longest Common Substring
B.B)1 - Longest Common Substring2 - Shortest Path Algorithm3 - Binary Search
C.C)1 - Shortest Path Algorithm2 - Longest Common Substring3 - Binary Search
D.D)1 - Longest Common Substring2 - Binary Search3 - Shortest Path Algorithm
查看解析

查看解析

标准答案
Please login to view
思路分析
To tackle this question, I’ll map each described problem to the most appropriate algorithm technique and then evaluate which option aligns with all three mappings. Option A: "1 - Binary Search, 2 - Shortest Path Algorithm, 3 - Longest Common Substring". For problem 1, binary search is unsuitable for finding a shared phrase between two large texts, since binary search is used on sorted data or to locate a target within a sorted structure, not to compare arbitrary substrings. So this mislabels the first problem. For problem 2, while a shortest path problem could be solved by a shortest path algorithm, option A a......Login to view full explanation

登录即可查看完整答案

我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!