While there is no proper solution to finding a hamiltonian cycle since it is a np - complete problem
But there are steps that you can do to check if the graph is hamiltonian
You can directly say that the graph is not hamiltonian by
a) It has a pendant vertex (degree = 1) or an isolated vertex (degree = 0).
Why: A Hamiltonian cycle must enter and leave every vertex using two distinct edges. A vertex with a degree less than 2 makes this structurally impossible.
b) It contains a Cut Vertex
Why: A cut-vertex is a vertex whose removal disconnects the graph into two or more separate components. If you pass through a cut-vertex to enter one component, you are trapped there.
You cannot leave that component to visit the rest of the graph without passing through that same cut-vertex a second time, which violates the Hamiltonian rule.
c) It contains a Bridge (Cut-Edge)
Why: Once you go through the bridge you would have to come back to the original vertex to complete the cycle, but crossing the bridge means you can never cross back to your starting component without reusing that same edge, breaking the cycle property
Well if any of the above conditions are satisfied we can conclude that it is not Hamiltonian
Now we can apply Dirac's theorem to check if the graph is hamiltonian or not
Dirac's Theorem:
If $G$ is a simple undirected graph with $n \ge 3$ vertices, and every vertex $v \in V$ satisfies:
$$\text{deg}(v) \ge \frac{n}{2}$$
Well this also fails in the above graph hence we will have to check for hamiltonian cycle manually
Here is the attached diagram that shows it is hamiltonian
