I’m trying to make this thing into a Euler path because that’s what the question is essentially about
my approach:
1)assign degrees to each vertex
2)find the number of even components(components with no odd degree vertex)
3)find the number of odd components(components with at least 1 odd degree vertex)
4)find the number of odd degree vertices in each component
5)connect all the even components
6)connect all the odd components
7)connect the final two components.
Am I missing something here?
I’ve considered the cases where even components =0 or when the odd components = 0 and they’re working.
I’ve also figured out that these are, in fact, the only test cases that got accepted.
I got only 2/6 test cases correct.
Is it because of long long int??