kirolloseisa's blog

By kirolloseisa, history, 4 years ago, In English

I get this error on one test case saying "out of bounds" .I think the code works fine.

What is the reason for this error?

Thanks in Advance!

174314198

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
4 years ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

That's because you are checking i+1 so you have to iterate in for loop n-1 times..

In your case it will be n+m-1 maybe..