Skip to content

Commit f722358

Browse files
add TODO notes
1 parent cf3fd79 commit f722358

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

MEDIUM/src/medium/LengthIncreasingSubsequence.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Your algorithm should run in O(n2) complexity.
2121
Credits:
2222
Special thanks to @pbrother for adding this problem and creating all test cases.*/
2323
public class LengthIncreasingSubsequence {
24-
24+
//TODO: completely understand the following approach and study other good solutions, this is a MUST!!! LIS is a very commonly seen interview question
2525
public int lengthOfLIS_using_binary_search_from_discuss(int[] nums) {
2626
/**Java doc for this Arrays.binarySearch method:
2727
* int java.util.Arrays.binarySearch(int[] a, int fromIndex, int toIndex, int key)

MEDIUM/src/medium/SingleNumberII.java

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
*/
1818
public class SingleNumberII {
1919

20+
//TODO: study its bit manipulation approach, this is a MUST!
21+
2022
public int singleNumber(int[] nums) {
2123
Map<Integer, Integer> map = new HashMap();
2224
for(int i : nums){

MEDIUM/src/medium/SingleNumberIII.java

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
Your algorithm should run in linear runtime complexity. Could you implement it using only constant space complexity?
1919
*/
2020
public class SingleNumberIII {
21+
// TODO: study its bit manipulation way, this is a MUST!
22+
23+
2124
//Approach 1: normal hashmap
2225
public int[] singleNumber(int[] nums) {
2326
Map<Integer, Integer> map = new HashMap();

0 commit comments

Comments
 (0)