the solution of Length of Last Word