摘要:
public class Solution { public int findPeakElement(int[] nums) { if (nums == null || nums.length == 0 || nums.length == 1) { retu... 阅读全文
摘要:
public class Solution { public int findMin(int[] nums) { if (nums == null || nums.length == 0) { return 0; } int re... 阅读全文
摘要:
public class Solution { public void setZeroes(int[][] matrix) { if (matrix == null || matrix.length == 0 || matrix[0].length == 0) { ... 阅读全文
摘要:
public class Solution { public TreeNode buildTree(int[] inorder, int[] postorder) { if (inorder == null || postorder == null || inorder.leng... 阅读全文
摘要:
public class Solution { public TreeNode buildTree(int[] preorder, int[] inorder) { if (preorder == null || inorder == null || preorder.lengt... 阅读全文
摘要:
public class Solution { public int maxArea(int[] height) { if (height == null || height.length < 2) { return 0; } ... 阅读全文
摘要:
public class Solution { public ArrayList> threeSum(int[] nums) { ArrayList> res = new ArrayList>(); if (nums == null || nums.length ... 阅读全文
摘要:
public class Solution { public int threeSumClosest(int[] nums, int target) { if (nums == null || nums.length < 3) { return Intege... 阅读全文