Updated the code for vertex cover