Hello everyone,
I want to invite you to participate in HackerEarth's Code Monk Contest where questions will be based on the Graph Theory. It is a 3 hour long contest scheduled on 22nd March at 8:30 AM PDT. To check your timezone, click here
The link to the contest: Link
The problem set consists of 5 algorithmic tasks with partial solutions allowed — you get points for every test that your solution passes. The problem set has been prepared by me. They have been tested by rivudas.
Also, top 3 newbie winners to get HackerEarth T-shirts in each Code Monk challenge!
To learn more about Graph Theory — click here.
Good luck everyone! :)
Update : Less than half hour left to the start of the contest.
Update : The Contest has ended.
The winners are:
1.fsshakkhor
2.elshiko
3.already_last
We are extremely sorry for the inconvience caused due to this missing condition of the subgraph being connected in the last question.
In question, Grizzly Circuit, what conditions should be kept in mind. What I get from the question is that, we need a Hamiltonian Path. And for it, we need two edges to connect two disconnected graph. And degree of every vertex should be even. Can anybody tell me, what is wrong in my approach? I received partial marks for this Solution.
You have to treat the following cases separately:
1. Only one even component and no odd component.
2. Only even components and no odd component.
3. Only odd components and no even component.
4. Odd and Even components.
Even component is a component with zero odd degree nodes. Otherwise it is odd component.
Thanks! What will be the difference if I connect an even component to even component and even component to odd component? Because, I am already taking the condition of odd degree edges. And adding them. Please see my solution.