Update Solution.java

Need to test in leetcode