Ad
  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    I think I have the most concise answer to this kata! Please vote up my solution if you agree :)

  • Custom User Avatar

    Best solution, imo. I was straining to figure out how to do this and couldn't reason it through at 11pm..

    Nice work!

  • Custom User Avatar

    Can someone explain how this works please?

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    What do you mean "didn't work"? Use triple backticks: ```langname, newline, paste your code, newline, close with ```. You MUST use newlines to separate from backticks, and type language name in lowercase.

    You can use the little eye symbol on the left when you reply, to view what your reply would look like.

    If your solution times out, then it means your solution has too many loops in it (too high time complexity)

  • Custom User Avatar

    Yea, no matter what I try, I can't post my code. I'll just try refactoring my code...

    Thanks!

  • Custom User Avatar

    The triple-quote markdown you sent me to didn't work...

  • Custom User Avatar

    The base can get up to 10,000 :P
    Please post your code using markdown formatting and with a spoiler flag.

  • Custom User Avatar

    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?

  • Custom User Avatar

    I went through the wiki page and others and still didn't find an answer as to how "" is ENQ...

  • Custom User Avatar

    This is perhaps one of the most simple clever answers ever. Outstanding work!

  • Custom User Avatar

    I contemplated this same approach but didn't realize it would test the conditions in order. Great lesson learned here, thanks for this!