If you compute the determinant of $A-\lambda I$ outright you should get:
$$ \det\begin{bmatrix} -\lambda & 1 & -1& 1\\ -1 & 2-\lambda & -1 & 1\\ 0&0 & 1-\lambda & -1 \\ 0&0&0& -\lambda \end{bmatrix} = $$$$\begin{align*} \det\begin{bmatrix} -\lambda & 1 & -1& 1\\ -1 & 2-\lambda & -1 & 1\\ 0&0 & 1-\lambda & -1 \\ 0&0&0& -\lambda \end{bmatrix} &= -\lambda \det\begin{bmatrix}-\lambda & 1 & -1\\ -1 & 2-\lambda & -1 \\ 0 & 0 & 1-\lambda \end{bmatrix}\\ &= -\lambda(1-\lambda) \det\begin{bmatrix} -\lambda & 1\\ -1 & 2-\lambda\end{bmatrix} \end{align*}$$ $$-\lambda \det\begin{bmatrix}-\lambda & 1 & -1\\ -1 & 2-\lambda & -1 \\ 0 & 0 & 1-\lambda \end{bmatrix} = -\lambda(1-\lambda) \det\begin{bmatrix} -\lambda & 1\\ -1 & 2-\lambda\end{bmatrix} $$ byby cofactor expansion along the bottom rows. The last term is:
$$ -\lambda(1-\lambda)[\lambda^2-2\lambda +1] = \lambda(\lambda -1)[(\lambda-1)^2] = \lambda(\lambda -1)^3. $$ From here, you know that the minimal polynomial is one of $\lambda (\lambda -1), \lambda (\lambda -1)^2, \lambda (\lambda -1)^3$ since it must share the same roots as the characteristic polynomial. Since there are only three you can plug in and check.