Ad
  • Default User Avatar

    Having a strange problem with this kata. when n is less than the number of values in array evrything is fine.

    when n is more and i have trailing 0's i know i am getting the right answer but it keeps timing out

    if i add something to the end like a 1 or 0 to check what im getting it runs fine and gives me the right answer with whatever iv added to the end.

    e.g answer = 1,2,3,4,5,0 i run my code and insert "3" at the end on purpose i get 1,2,3,4,5,0,3.... if i remove 3 it times out?!?!?

    i dont understand why this would happen.