Ad
  • Custom User Avatar

    Please don't give snippet or codes or method to solve a kata without using a spoiler flag, though it doesn't work. Users are supposed to solve the katas by themselves. I don't know what you do exactly but it's always delicate to modify an array while iterating on it. This kata is really easy for a 5 kyu (a fair rank would be 7 kyu), you should try and think by yourself. It's a good idea to print stuff to see what your function is doing in action. This can help: https://docs.codewars.com/training/troubleshooting/