I need help. I've written some simple code to solve this, and it works on the test cases. But when I hit Attempt, it comes back 12 seconds later and says I've timed out.
Do some of the Attempt's test cases get really big? I don't see anything in my code that would take that long to run unless it was passing in 1,000,000 or something. And I can't imagine how someone would solve this with too much less code (execution-wise and length-wise) than what I'm doing (3 lines in total, 2 list comps).
This comment is hidden because it contains spoiler information about the solution
I think I have the most concise answer to this kata! Please vote up my solution if you agree :)
Best solution, imo. I was straining to figure out how to do this and couldn't reason it through at 11pm..
Nice work!
Can someone explain how this works please?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Yea, no matter what I try, I can't post my code. I'll just try refactoring my code...
Thanks!
The triple-quote markdown you sent me to didn't work...
I need help. I've written some simple code to solve this, and it works on the test cases. But when I hit Attempt, it comes back 12 seconds later and says I've timed out.
Do some of the Attempt's test cases get really big? I don't see anything in my code that would take that long to run unless it was passing in 1,000,000 or something. And I can't imagine how someone would solve this with too much less code (execution-wise and length-wise) than what I'm doing (3 lines in total, 2 list comps).
Any ideas?
I went through the wiki page and others and still didn't find an answer as to how "" is ENQ...
This is perhaps one of the most simple clever answers ever. Outstanding work!
I contemplated this same approach but didn't realize it would test the conditions in order. Great lesson learned here, thanks for this!