Ad
  • Custom User Avatar

    This was my first thought lol. My solution isn't clever, but it's O(n) and I got it working in under 5min. The only other 5kyu I've done took me more than a day and pushed me hard. This definitely feels like a 7 and not even on the harder side of 7.

  • Custom User Avatar

    Great problem. My first 5 Kyu... and boy was it a challenge for me. All my solutions are so bulky lol.

  • Custom User Avatar

    Ah I see thank you for explaining it and fixing it. So me using pop() was the problem. I'll keep it in mind that some problems may not play well with mutating an array.

  • Custom User Avatar

    Hmm, but I failed the same test case where I was just modifying the board by updating our position in it with an "x". I assumed to solve this we'd need to update one of the parameters... but I suppose that only matters if you're doing it recursively. I coulda just tracked my position with a variable and a while loop or something and it probably woulda been simpler.

    What did you mean by 'exhausted' though.

  • Custom User Avatar

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