I am not able to find approach to this problem
i know i need to apply euler path thing but still not able to figure it out completely
please help
Sakshi and art question
Consider this as a graph(lines as edges and points as nodes). We need to add edges, such that there is a Euler Path. Let C1, C2, C3 ,C4 … Ck be connected components of graph. Count the number of vertices(count of the open ends) with odd degree. 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 atmost two open ends unpaired. That means, the number of pairings that need to be done are the minimum number of edges to be added.
this is my well commented code ( i have specified logic behind each important step )
am only passing the first testcase
please tell me error in my logic / code
this is my well commented code ( i have specified logic behind each important step ) https://ide.codingblocks.com/s/111063 am only passing the first testcase please tell me error in my logic / code
dont debug my code i solved it
thanks for the beautiful explanation sir
welcome bro
could u tell me what is lagging in the code? ??