A stone is thrown at an angle θ to the horizontal reaches a maximum height H. Then the time of flight of stone will be

(1) $\sqrt{\frac{2H}{g}}$

(2) $2\text{\hspace{0.17em}}\sqrt{\frac{2H}{g}}$

(3) $\frac{2\sqrt{2H\text{\hspace{0.17em}}\mathrm{sin}\theta }}{g}$

(4) $\frac{\sqrt{2H\text{\hspace{0.17em}}\mathrm{sin}\theta }}{g}$