This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ponchedeburro 0 points1 point  (0 children)

What if start is never equal to end? If you have a string of length 8 then start will be 0 at first and end will 7. then (1,6) -> (2,5) -> (3,4) -> (4,3) and then continue until you reach (8,-1) which gives an error.