摘要:
注意:1,除法那里b+=b是错的。b一直在改变。 2,仔细一点。import java.util.*;public class AddSubstitution { public int calc(int a, int b, int type) { // write code... 阅读全文
摘要:
//注意,1,要判断null;2,要注意ArrayList直接复制会被一起改变。要通过new的方式来操作。public class Solution { public static void main(String[] args){ TreeNode root = new Tre... 阅读全文
摘要:
import java.util.*; public class LCA { public static int getLCA(int a, int b){ if(a b){ a = a/2; ... 阅读全文
