for jump game #28, do it in recursive way