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. The task is to find out a path which resembles the most with the given path. There could be multiple possible outputs.
Input Path: ["KPG"->"DPS"->"SIN"->"AUH"]
Expected Output: ["KUL"->"DPS"->"CGK"->"AUH"]
In the above example, the least number of changes that you have to make is to replace KPG with KUL, and SIN with CGK.
Input Path: ["XXX", "TBS", "DME"]
Expected Output: ["ATH", "TBS", "DME"]