摘要:
1 /** 2 * Definition for binary tree 3 * public class TreeNode { 4 * int val; 5 * TreeNode left; 6 * TreeNode right; 7 * TreeNode(int x) { val = x; } 8 * } 9 */10 public class Solution {11 public boolean isSameTree(TreeNode p, TreeNode q) {12 // Start typing your... 阅读全文
摘要:
1 public class Solution { 2 public int sqrt(int x) { 3 // Start typing your Java solution below 4 // DO NOT write main() function 5 double result = x; 6 7 while (Math.abs(result * result - x) > 0.0001) 8 { 9 result = (result + x / re... 阅读全文