Dirac’s theorem (1952) is a classical result of graph theory, stating that an n-vertex graph (n≥3n≥3) is Hamiltonian if every vertex has degree at least n/2. Both the value n/2 and the requirement for every vertex to have high degree are necessary for the theorem to hold. In this work we give efficient algorithms for determining Hamiltonicity when either of the two conditions are relaxed. More precisely, we show that the Hamiltonian Cycle problem can be solved in time ck⋅nO(1)ck⋅nO(1), for a fixed constant c, if at least n−kn−k vertices have degree at least n/2, or if all vertices have degree at least n/2−kn/2−k. The running time is, in both cases, asymptotically optimal, under the exponential-time hypothesis (ETH). The results extend the r...