Date | Question# | Title | Difficulty | Submitted/Undo | Area | Improvement | Note |
11/19/2017 | 520 | Detect Capital | Easy | submitted | String | Try to learn more about Regular Expression in JAVA | x.matches();[A-Z][a-z]+ |
11/19/2017 | 696 | Count Binary Substrings | Easy | submitted(参考答案更优) | count | Practice releated question (common used) | cur/pre 分别进行计数 |
11/19/2017 | 389 | Find the Difference | Easy | submitted(参考答案更优) | convert: char & int | 之前:用了map;更优方法:使用charcode |
|
11/19/2017 | 283 | Move Zeroes | Easy | submitted | sort/swip |
|
|
11/19/2017 | 27 | Remove Element | Easy | submitted | for loop |
|
|
11/20/2017 | 728 | Self Dividing Numbers | Easy | submitted | % & / 10 to get every digit of int |
|
|
11/20/2017 | 507 | Perfect Number | Easy | submitted | % & / 10 to get divisors | 对于divisors=1需要额外考虑,divisors=divisors也要注意 |
|
11/20/2017 | 448 | Find All Numbers Disappeared in an Array | Easy | submitted | array | 特殊思路:数组指针和值相互联系,通过标志正负确定是否存在 |
|
11/20/2017 | 653 | Two Sum IV - Input is a BST | Easy | submitted | BST | BST的固定思路都是写递归 |
|
11/20/2017 | 167 | Two Sum II - Input array is sorted | Easy | submitted | sorted array: lo & hi 指针 |
|
|
11/20/2017 | 606 | Construct String from Binary Tree | Easy | submitted | BST | 根据左右分情况 | 不熟练 |
11/20/2017 | 598 | Range Addition II | Easy | submitted | 图 |
|
|
11/21/2017 | 695 | Max Area of Island | Easy | submitted | DFS |
| 图常用方法 |
11/21/2017 | 371 | Sum of Two Integers | Easy | submitted | 二进制计算 ^ & << |
|
|
11/21/2017 | 169 | Majority Element | Easy | submitted(参考答案更优) | pre: map | ask for best answer |
|
11/21/2017 | 404 | Sum of Left Leaves | Easy | submitted | BST |
| Recursive method |
11/21/2017 | 563 | Binary Tree Tilt | Easy | submitted | BST |
|
|
11/21/2017 | 383 | Ransom Note | Easy | submitted | 利用int[char - 'a']存放字母个数,再用--,找是否在另一个字符串里 |
|
|
11/21/2017 | 122 | Best Time to Buy and Sell Stock II | Easy | submitted | add all price[i] - privr[i-1] |
|
|
11/21/2017 | 171 | Excel Sheet Column Number | Easy | submitted | 视为26进制,值为s.charAt(i)-'A'+1 |
|
|
11/21/2017 | 168 | Excel Sheet Column Title | Easy | submitted | 先n--; | StringBuilder() StringBuffer() |
|
12/7/2017 | 492 | Construct the Rectangle | Easy | submitted | sqrt(w) w—- —> result |
|
|
12/7/2017 | 455 | Assign Cookies | Easy | submitted | sort; small -> big; # of demand <= # of supply; result | time |
|
12/7/2017 | 733 | Flood Fill | Easy | submitted | DFS |
|
|
12/7/2017 | 463 | Island Perimeter | Easy | submitted | 根据对图的理解进行数学总结,得出算法 |
|
|
12/7/2017 | 453 | Minimum Moves to Equal Array Elements | Easy | submitted | Math Problem |
|
|
12/7/2017 | 387 | First Unique Character in a String | Easy | submitted | 利用int[char - ‘a’]存放字母个数,再找=1的第一个(for循环) |
|
|