#### An alternate approach

Breaking everything into components is the standard approach to analyzing projectile motion questions, but sometimes looking at whole vectors can also get you to an answer.

For instance, look at the whole vectors for position and let the simulation go until it stops. You get a right-angled triangle where simple geometry gets you the same equation we derived for time-of-flight earlier.

If you look at the whole vectors for velocity and go to the maximum height position, the geometry of right-angled triangles gets you the time to reach maximum height.