摘要:
1. data initialization : index = 0. 2. use a set to deduplicate the numbers. 阅读全文
摘要:
1. Use TreeMap since it's keySet is sorted. 阅读全文
摘要:
1. This binary search is find the insertion position. Since it starts from end of array. So it must be greater and equal to mid number. The merge sort 阅读全文
摘要:
1. Add " " to ensure the comparision works. Or add a condition that result.length() > 0 2. character counting decrease happens before check it has bee 阅读全文
摘要:
Basic idea: 1. starting from each element expanding to all map. Find a 0, add one to reach, and level traversal to. 2. Go through each element again. 阅读全文
摘要:
1. Do not forget to left shift the number. 阅读全文
摘要:
1. Do not need to check boundary case since the helper function can add "" into result. 2. Do not forget to add that character if not counting into ab 阅读全文
摘要:
1. When divide k into two parts, it could be 0 for the any part. So i <= nums1.length. 阅读全文