摘要:
1 class Solution { 2 public int removeDuplicates(int[] nums) { 3 if(nums.length == 0) return 0; 4 if(nums.length == 1) return 1; 5 int i = 1, j = 1; 6 int co... 阅读全文
摘要:
1 class Solution { 2 List> res = new ArrayList(); 3 public List> combine(int n, int k) { 4 if(k == 0) return null; 5 int[] nums = new int[n]; 6 for(int i = 0; i ... 阅读全文
摘要:
1 class Solution { 2 public void sortColors(int[] nums) { 3 if(nums == null || nums.length == 0) return; 4 int count0 = 0; 5 int count1 = 0; 6 int count2 = 0... 阅读全文
摘要:
用Binary search 先搜索row 再搜索col 阅读全文