Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
There're already several katas about finding a pair of elements in an array in linear time. And here the "expected" time complexity is not even enforced.
1º The description is not consistent as it states that 2 different movies should be returned, but then there's an edge case with only one movie being returned.
2º You should specify that in case we couldn't find 2 movies, we should return one equal to the half of the flight
This comment is hidden because it contains spoiler information about the solution
Thank you for the help.
Random tests added, issue resolved.
Needs random tests
Added 4 more testcases
Added 4 more testcases
Added more
Added 4 more testcases.
one testcase ?
Only one test :(
While the story differs, this is a duplicate of http://www.codewars.com/kata/a-gift-well-spent.
Not enough testcases...