Iiinertia_1412's blog

By Iiinertia_1412, history, 2 years ago, In English

Here are two codes for question- Your text to link here...

code 1-Your text to link here...

code 2-Your text to link here...

In code 1 iterator is erased first and dereferenced after that.(Runtime error at test 39).

In code 2 iterator is dereferenced first and erased from set after that.(Accepted)

If code 1 is wrong practice why it got accepted for 38 test cases?

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