You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -118,6 +118,7 @@ Remember solutions are only solutions to given problems. If you want full study
118
118
| 387 |[First Unique Character in a String](https://leetcode.com/problems/first-unique-character-in-a-string/)|[Python](https://github.com/qiyuangong/leetcode/blob/master/python/387_First_Unique_Character_in_a_String.py)[Java](https://github.com/qiyuangong/leetcode/blob/master/java/387_First_Unique_Character_in_a_String.java)| Get frequency of each letter, return first letter with frequency 1, O(n) and O(1) |
119
119
| 388 |[Longest Absolute File Path](https://leetcode.com/problems/longest-absolute-file-path/)|[Python](https://github.com/qiyuangong/leetcode/blob/master/python/388_Longest_Absolute_File_Path.py)| Store last length and rindex, O(n) and O(n) |
120
120
| 389 |[Find the Difference](https://leetcode.com/problems/find-the-difference/)|[Python](https://github.com/qiyuangong/leetcode/blob/master/python/389_Find_the_Difference.py)[Java](https://github.com/qiyuangong/leetcode/blob/master/java/389_Find_the_Difference.java)| 1. Imaging letter a as 0, then the sum(t)-sum(s) is the result<br> 2. Based on solution 1, bit manipulate |
| 401 |[Binary Watch](https://leetcode.com/problems/binary-watch/)|[Python](https://github.com/qiyuangong/leetcode/blob/master/python/401_Binary_Watch.py)[Java](https://github.com/qiyuangong/leetcode/blob/master/java/401_Binary_Watch.java)| Note that 12 * 60 is much less than 2^n or n^2. |
122
123
| 404 |[Sum of Left Leaves](https://leetcode.com/problems/sum-of-left-leaves/)|[Python](https://github.com/qiyuangong/leetcode/blob/master/python/404_Sum_of_Left_Leaves.py)[Java](https://github.com/qiyuangong/leetcode/blob/master/java/404_Sum_of_Left_Leaves.java)| 1. Recursively DFS with root.left.left and root.left.right check<br>2. The same DFS based on stack |
123
124
| 405 |[Convert a Number to Hexadecimal](https://leetcode.com/problems/convert-a-number-to-hexadecimal/)|[Python](https://github.com/qiyuangong/leetcode/blob/master/python/405_Convert_a_Number_to_Hexadecimal.py)[Java](https://github.com/qiyuangong/leetcode/blob/master/java/405_Convert_a_Number_to_Hexadecimal.java)|[Two's complement](https://en.wikipedia.org/wiki/Two%27s_complement) 1. Bit manipulate, each time handle 4 digits<br>2. Python (hex) and Java API (toHexString & Integer.toHexString) |
@@ -126,6 +127,7 @@ Remember solutions are only solutions to given problems. If you want full study
126
127
| 416 |[Partition Equal Subset Sum](https://leetcode.com/problems/partition-equal-subset-sum/)|[Python](https://github.com/qiyuangong/leetcode/blob/master/python/416_Partition_Equal_Subset_Sum.py)| DP, Check if sum of some elements can be half of total sum, O(total_sum / 2 * n) and O(total_sum / 2) |
127
128
| 421 |[Maximum XOR of Two Numbers in an Array](https://leetcode.com/problems/maximum-xor-of-two-numbers-in-an-array/)|[Python](https://github.com/qiyuangong/leetcode/blob/master/python/421_Maximum_XOR_of_Two_Numbers_in_an_Array.py)| Check 0~32 prefix, check if there is x y in prefixes, where x ^ y = answer ^ 1, O(32n) and O(n) |
128
129
| 422 |[Valid Word Square](https://leetcode.com/problems/valid-word-square/)♥|[Python](https://github.com/qiyuangong/leetcode/blob/master/python/422_Valid_Word_Square.py)| Compare row with column, O(n^2) |
130
+
| 463 |[Island Perimeter](https://leetcode.com/problems/island-perimeter/)|[Python](https://github.com/qiyuangong/leetcode/blob/master/python/463_Island_Perimeter.py)[Java](https://github.com/qiyuangong/leetcode/blob/master/java/463_Island_Perimeter.java)| math, find the area, actual number, then find the digit |
0 commit comments