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.
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.
In the last
while
loop, you eraseit1
, 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.Thank you so much! I forgot about that.