Most similar path in the graph

Revision en1, by swordx, 2022-01-30 20:01:54

Hello Guys,

Could you share your thoughts on the following question:

Given an undirected graph with node values as string, and a path to follow, you have to find a path which is most similar to the input path.

For example, for the following graph:

Please note that the value in the input path could be completely different from any existing node.

Input Path: ["KPG", "DPS", "SIN", "AUH"]

Expected Output: ["KUL", "DPS", "CGK", "AUH"]

Input Path: ["XXX", "TBS", "DME"]

Expected Output: ["ATH", "TBS", "DME"]

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en4 English swordx 2022-01-30 22:08:52 49
en3 English swordx 2022-01-30 22:07:28 811
en2 English swordx 2022-01-30 21:59:51 275
en1 English swordx 2022-01-30 20:01:54 630 Initial revision (published)