Dont memorise any formulas given to you in any book you might have.
Because 1. They give it to you most of the time and
2. If you are asked to derive it, its most likely a different scenario (i.e. the origin not being where the projectile is fired)
Remember that at
when the particle is at maximum height.
This is general logic anyway.
Dont freak out when you see the question. Always think logically and thoroughly.