Solution (source code)

= Solution

Let $Av_i=\lambda_i v_i$ and $Av_j=\lambda_jv_j$. The <skew-Hermitian matrix> property gives
$$
\lambda_jv_i^\dagger v_j=v_i^\dagger Av_j=-(Av_i)^\dagger v_j=-\overline\lambda_i\,v_i^\dagger v_j=\lambda_i v_i^\dagger v_j,
$$
where the last equality uses part (a). Distinct <eigenvalues> therefore imply $\boxed{v_i^\dagger v_j=0\text{ for }i\ne j}$. Normalize each <eigenvector> to length one. Since there are $n$ distinct <eigenvalues>, these vectors form an <orthonormal basis>.

Put them in the columns of $U$. Then $U$ is a <unitary matrix> and $AU=UD$, so
$$
\boxed{A=UDU^\dagger,\qquad D=\operatorname{diag}(\lambda_1,\ldots,\lambda_n).}
$$