We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Journey Scheduling
Journey Scheduling
Sort by
recency
|
17 Discussions
|
Please Login in order to post a comment
Here, I think the main aim is to indentify the fact that the maximum distance for visiting successing cities after visiting the first city, will always be equal to maximum possible distance between any two nodes, which has to be only calculated for once. Hence, we only have to calculate the distance to the starting city (V), and then add the previously calculated maximum distance for the remaining count of cities.
Here is my solution in jav, javascript, python, C, C++, Csharp HackerRank Journey Scheduling Problem Solution
Here is the solution of Journey Scheduling Click Here
https://zeroplusfour.com/journey-scheduling-hackerrank-solution/
Here's how I did in all languages Java 8 , C++ , C , Python 3, Python 2.
hi, my code is working properly but i am not able to optimize according to time. when i calculate for [85(V) 8276338(num_cities)] then i get answer but when i do for [85(V) 827633810(num_cities)] then i get runtime error.
kindly give any guidance for time optimizing