Ad
  • Default User Avatar

    Basically, you are trying to find n by adding your current 'step', whether positive or negative.
    starting at a total of 0,
    on step 1 you'll add 1 or add -1
    on step 2 you'll add 2 or add -2
    on step 3 you'll add 3 or add -3
    What ever it takes to reach the value of n

  • Default User Avatar

    How do I share this to friends that aren't on Codewars

  • Default User Avatar

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

  • Default User Avatar

    Thanks, but how does that come about? I get mutating the input is usually a no-no but how does that affect the tests?

  • Default User Avatar

    Have a problem where all the random test cases are expecting '' while my code returns various strings that seem to match the numbers submitted. Is there a problem with this kata?

  • Default User Avatar

    I dont understand how the example returns 6

    [-2, 1, -3, 4, -1, 2, 1, -5, 4]
    

    only 1 and 4 are continuous.
    am I missing something?

  • Default User Avatar

    Seriously, you should re-read everything you've written. All I did was ask a question yet, you come at me passive aggressively and call me an ass when I call you out on it?
    You obvoiusly have social issuses. Maybe you do this for a living and get off to bullying people that do this for a hobby, but revisit your approach.

  • Default User Avatar

    Wow, I literally admitted to being new, thanks for being passive aggressive.
    Your example makes the point of the return not strictly 1 or 0, without context, I dont understand how you are getting your returns.

  • Default User Avatar

    Sorry for my naiveté, but the only array is num and I don't choose which numbers make it up, I just split it up.
    If I'm misunderstanding, please help me understand, I'm still new to code.
    I will address the first loop logic.

  • Default User Avatar

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

  • Default User Avatar

    My test passed after I changed null back to false.
    I know that the code is incomplete. I noticed it skips some letters at times, but I don't fully see why.

  • Default User Avatar
  • Default User Avatar

    correct me please, I understand that my code loops through the string and takes a letter out of alph, once it appears.
    null is basically there because I didn't expect my code ever get to null.
    I'm still a beginner so I believe regex would allow me to skip, what I believe to be, other key fundamentals.

  • Default User Avatar

    I don't understand what you mean, we aren't looking for non-letters. from my understanding, the code skips anything that is not a letter. I also avoid using regex by the way.

  • Default User Avatar

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

  • Loading more items...