Ad
  • Custom User Avatar

    I'm late to this discussion, but you don't have to solve it quickly. These are meant to be practice exercises that teach you, and if you can knock it out fast then you haven't learned much. I did this over a period of several days, working on it an hour or so at a time.

    Sure, agile development means working quickly. But that only works for the application of algorithms you already know or those that are trivial to engineer. Any real challenge will take real work, and real work is never fast.

  • Custom User Avatar

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

  • Custom User Avatar

    Don't worry, It's completely normal. All of us been there.give this kata some rest, go solve other ones,come back some day later. a couple of days ago I got a sudden realization how to solve a 4 Kyi kata I first attempted over a year ago.

  • Custom User Avatar

    Your global var keep values between tests when the function is called more than once, make it local.