  In this paper, we study the stability result of a well-known theorem of
Bondy. We prove that for any 2-connected non-hamiltonian graph, if every vertex
except for at most one vertex has degree at least $k$, then it contains a cycle
of length at least $2k+2$ except for some special families of graphs. Our
results imply several previous classical theorems including a deep and old
result by Voss. We point out our result on stability in Bondy's theorem can
directly imply a positive solution (in a slight stronger form) to the following
problem: Is there a polynomial time algorithm to decide whether a 2-connected
graph $G$ on $n$ vertices has a cycle of length at least
$\min\{2\delta(G)+2,n\}$. This problem originally motivates the recent study on
algorithmic aspects of Dirac's theorem by Fomin, Golovach, Sagunov and Simonov,
although a stronger problem was solved by them by completely different methods.
Our theorem can also help us to determine all extremal graphs for wheels on odd
number of vertices. We also discuss the relationship between our results and
some previous problems and theorems in spectral graph theory and generalized
Tur\'{a}n problem.
