solve the unique paths problem.