Ad
  • Custom User Avatar

    OP solved it, closing

  • Custom User Avatar

    sorry for the weird formatting, it got screwed up when I posted it normally, so I tried to make it as readable as I could lol

    Next time you can use Markdown formatting to format it: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code

    Something in the "Excruciatingly Long List Tests" is timing out for you :D

    BTW:
    This looks like O(n^3) (I'm not good at time complexity, so that's probably a bit inaccurate), But I see an O(n) solution is possible (I think that's O(n), where n = len(ints)). Try another way of doing it.

  • Custom User Avatar

    God, that's so funny

  • Custom User Avatar

    ok, that's actually it, but because of sort of an "edge case". Print stuff inside your loop, so that you'll hit the buffer limit before anything else (print enough, tho), that should allow you to track what you forgot.

  • Custom User Avatar

    that means you're storing too much data in memory. You need to change your approach a bit to make it "memory wise"

    wait, forget that. I forgot you needed to return the complete sequence. No idea for now.