Ad
  • Custom User Avatar

    if youre in python

  • Custom User Avatar

    maybe you could make a list of n elements and one could be different--that one would be poisoned(e.g.['a','a','a'....'b']etc.)?

  • Custom User Avatar

    My guess is you're using a global var that keeps its value when your function is called more than once.

  • Default User Avatar

    It's a good idea to tell which programming language you are using.
    My first guess is you are modifying the arguments given.

  • Default User Avatar

    Hey,

    without seeing any code, it's difficult to know what might be going on. Here are a few ideas though (some you may have tried)

    1. the Kata specifies that all non-spaces should be treated the same, so treat \n \t \r just like you would any other character that needs to be shifted

    2. make sure when you take indexes for where you are removing spaces that you aren't altering the string at the same time since this will change indexes for following spaces.

    3. depending on how you're inserting the spaces back into the output string, you may be accidentally overwriting the same index multiple times, it might help to print out the indeces using your languages println / log function

    I hope these give you some clues and ideas as to were your issue resides.

    If you need any additional help, I'll be happy to follow up with another reply.