I have been working only on this problem for the past 2 days. I must have already spent 10 hours or so. I have a working solution for all the examples but not for the real solution.
Long story short, I had decided to use a greedy algorithm and after I saw your reply I will now try with Dijkstra's algorithm.
Thank you so much!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I have been working only on this problem for the past 2 days. I must have already spent 10 hours or so. I have a working solution for all the examples but not for the real solution.
Long story short, I had decided to use a greedy algorithm and after I saw your reply I will now try with Dijkstra's algorithm.
Thank you so much!