One price - Two travels

One price - Two travels

When I test my code on the "new_input1" scenario (which is available on the forum) it produces a different ouput than the one produced by the original code but is still valid in my opinion : the flights are different but the cost is the same.

The difference between the two outputs (let's say the work hard outputs) is the date of the return flight. The one I find takes off and lands earlier than the one found by the original code.

So here is my question : if two different flights are available, and have the same cost but different dates, which one should we choose ? In that particular case, as the traveller, I would like to go home as soon as possible, but this is not what the original code does.

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

This issue was discussed several times. Read here my comment about flights with same cost in new_input1, and answer from Cedric.

Thanks for the answer btw, I didn't even take time to thank you...
Should have searched better.

Leave a Comment

Please sign in to add a comment. Not a member? Join today