I know it is eulerian path question. Can you brief me about the logic??
(Please dont write this :
Count the number of vertices(count of the open ends) with odd degree in a component. If there is no vertex with odd degree, in a connected component, consider that there are two open ends, so add two to the count.
You can leave at most two open ends unpaired. That means, the number of pairings that need to be done are the minimum number of edges to be added.)
My code for reference:
It would be much better if you can give me a faulty test case as well!!!
Thank you!!