The Problem: Show that the following two matrices are similar in $M_p(\mathbb{F}_p)$: $$\begin{pmatrix} 1 & 1 & 0 & \cdots & 0 & 0 \\ 0 & 1 & 1 & \cdots & 0 & 0\\ 0 & 0 & 1 & \cdots & 0 & 0\\ \vdots & \vdots & \vdots& \ddots & \vdots &\vdots\\ 0 & 0 & 0 & \cdots & 1 & 1\\ 0 & 0 & 0 & \cdots & 0 & 1\\ \end{pmatrix}$$ and $$\begin{pmatrix} 0 & 0 & 0 & \cdots & 0 & 1 \\ 1 & 0 & 0 & \cdots & 0 & 0\\ 0 & 1 & 0 & \cdots & 0 & 0\\ \vdots & \vdots & \vdots& \vdots & \vdots &\vdots\\ 0 & 0 & 0 & \cdots & 1 & 0\\ \end{pmatrix}$$.
Source: Abstract Algebra, $\mathit{3^{rd}}$ edition by Dummit and Foote.
My Question: The same question has been asked before here. Now, the two matrices have the same minimal polynomial, then since they have the same characteristic polynomial, it follows that they have the same elementary divisor $(x-1)^p$, hence obviously they'd have the same Jordan Canonical Form as well, thus they are similar. This argument is somehow deemed invalid by my professor, and I just couldn't figure out where the invalidity lies-any help would be greatly appreciated.
Here is a more rigorous argument, courtesy of @SungjinKim and @Eric: Since the two matrices have the same characteristic polynomial and the same minimal polynomial AND the characteristic polynomial equals the minimal polynomial, it follows that they also have the same invariant factor, namely $(x-1)^p$, hence also the same elementary divisor, namely (also) $(x-1)^p$. Thus there is only one Jordan block in both of their Jordan Canonical Forms, and that Jordan block is the same with 1's along the main diagonal and 1's along the first superdiagonal.