  In this paper we study geodesics of left-invariant sub-Riemannian metrics on
SO(3) and almost-Riemannian metrics on $S^2$. These structures are connected
with each other, and it is possible to use information about one of them to
obtain results about another one. We give an explicit parameterization of
sub-Riemannian geodesics on SO(3) and use it to get a parameterization of
almost-Riemannian geodesics on $S^2$. We use symmetries of the exponential map
to obtain some necessary optimality conditions. We present some upper bounds on
the cut time in both cases and describe periodic geodesics on SO(3).
