摘要:
DO NOT forget to move the end index one more. Otherwise, it will keep stucking in same vowel. 阅读全文
摘要:
Last DP element MAY NOT be the answer since the max number can happened between. 阅读全文
摘要:
Another solution is sort all the points and create another reflected points array. Sort again, then they should be same. 阅读全文
摘要:
1. When n == 0, it return 1. 2. Since already make result = 10, count until 2. 阅读全文
摘要:
1 public class Solution { 2 public List largestDivisibleSubset(int[] nums) { 3 List result = new ArrayList(); 4 if (nums.length == 0) { 5 return result; 6 ... 阅读全文
摘要:
1. Do not need to update all the element from i to j. Since it starts with all 0 array. We can simple use start and end as the mark, sum all the value 阅读全文
摘要:
1 /** 2 * Definition for singly-linked list. 3 * public class ListNode { 4 * int val; 5 * ListNode next; 6 * ListNode(int x) { val = x; } 7 * } 8 */ 9 public class Solutio... 阅读全文