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.
Not an error - both 92 and 94 are missing from the sequence, so the sequence is invalid and the answer is -1
Mistake Test.assert_equals(missing("8990919395"),-1) !
It must be equal 92 or 94.
Mistake Test.assert_equals(missing("8990919395"),-1) !
It must be equal 92 or 94.
This one had me stumped for a day. Very rewarding once solved! Thanks!
Same!
This blew my mind!
I totally agree. This was much too easy for a 4 kyu.
I'm trying to wrap my head around this solution too. Could you briefly explain what is going on inside "if n != end + 1:" and how you came up with such an idea?
Cheers!
A generous helping of int() and // in python.
Good luck!
I'm having the same problem you did, how exactly did you resolve yours again?
Yes I got stuck because I tried to use stream. I am not sure how to make each value unique
Thanks for your reply. I used integer conversions throughout my solution, but somehow the random tests would display a float occasionally, despite every output being defined as an integer. I'll have another look!
Cheers
This kata is perfectly solvable with integers, so if your solution uses floating point numbers at any point, it can be probably improved.
One of the few 4 kyu that I just knew how to code up and found very straight forward, thanks! I found that the random tests behaved, well, randomly. Some would pass and some would fail depending on the numbers thrown to the function. These cases generally seemed to be where the seconds or minutes were 0.0000000001 away from the nearest int. I'll have another look, but everything passed fine and I was allowed to submit.
I most definitely agree. It took me a while to figure this one out, on my own without the help of google. Because of all of the head scratching, I will forever be able to code this problem in any language.
Loading more items...