adzo261's blog

By adzo261, history, 5 weeks 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  

»
4 weeks 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.

»
4 weeks ago, # |
  Vote: I like it +3 Vote: I do not like it

Thank you so much! I forgot about that.