摘要:
时间复杂度:O(n)// 判断是否为AVL树 public int isAVL(TreeNode node) { if (node == null) { return 0; } int left = isAVL(node.left); if (left == -1) { return -1; } int right ... 阅读全文
摘要:
1、2Sum 题目: 方法一:两次迭代 public class TwoSum { public static int[] twoSum(int[] nums, int target) { int[] indices = {-1,-1}; for(int i=0; i<nums.length-1; 阅读全文