  We introduce a notion of the \emph{crux} of a graph $G$, measuring the order
of a smallest dense subgraph in $G$. This simple-looking notion leads to some
generalisations of known results about cycles, offering an interesting paradigm
of `replacing average degree by crux'. In particular, we prove that
\emph{every} graph contains a cycle of length linear in its crux.
  Long proved that every subgraph of a hypercube $Q^m$ (resp. discrete torus
$C_3^m$) with average degree $d$ contains a path of length $2^{d/2}$ (resp.
$2^{d/4}$), and conjectured that there should be a path of length $2^{d}-1$
(resp. $3^{d/2}-1$). As a corollary of our result, together with isoperimetric
inequalities, we close these exponential gaps giving asymptotically optimal
bounds on long paths in hypercubes, discrete tori, and more generally Hamming
graphs.
  We also consider random subgraphs of $C_4$-free graphs and hypercubes,
proving near optimal bounds on lengths of long cycles.
