The horizontal range is:
\[\frac{u^2 \sin 2\theta}{g},\]
and the maximum height is:
\[\frac{u^2 \sin^2 \theta}{2g}.\]
Equating:
\[\frac{u^2 \sin 2\theta}{g} = \frac{u^2 \sin^2 \theta}{2g}.\]
Simplifying:
\[2 \sin \theta \cos \theta = \frac{\sin^2 \theta}{2}.\]
Substitute \(\sin 2\theta = 2 \sin \theta \cos \theta\):
\[4 \sin \theta \cos \theta = \sin^2 \theta \implies 4 = \tan \theta.\]
Thus:
\[\theta = \tan^{-1}(4).\]