1. Using Vector Erase

Code

Output