Question: There is no need to write the code, just the steps on how to solve it/finding the algorithm, thats what the question is asking in

There is no need to write the code, just the steps on how to solve it/finding the algorithm, thats what the question is asking in general.
There are n cities where for each i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
