adzo261's blog

By adzo261, history, 6 years ago, In English

I am getting a runtime error on test case 6. Since it is a large test case, I am unable to find what's giving RE in my code.

Can someone please have a look at my code, or give me some small test case similar to case 6.

Link to my solution

  • Vote: I like it
  • -13
  • Vote: I do not like it

»
6 years ago, # |
  Vote: I like it 0 Vote: I do not like it

In the last while loop, you erase it1, then you use it, but after erasing an iterator, we cannot be sure to where this iterator points, so we should use the it, then erase it.

»
6 years ago, # |
  Vote: I like it +3 Vote: I do not like it

Thank you so much! I forgot about that.