Solved UniquePaths in java