${}$
Because $\mathrm{cos}\left(n\right)$ is sometimes positive and sometimes negative, but not in strict alternating sequence, this is a series with both positive and negative terms, but it is not an alternating series. Hence, the Leibniz test cannot be used.
Instead, establish the absolute convergence (and hence, the conditional convergence) of the series by applying the Comparison test, comparing the series with the convergent $p$-series $\mathrm{\Σ}1sol;{n}^{2}$. Indeed, $\left|\mathrm{cos}\left(n\right)\/{n}^{2}\right|\le 1\/{n}^{2}$, so the given series converges absolutely, and hence, conditionally.
${}$