Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf722358

Browse files
add TODO notes
1 parentcf3fd79 commitf722358

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

‎MEDIUM/src/medium/LengthIncreasingSubsequence.java

Lines changed: 1 addition & 1 deletion
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
publicclassLengthIncreasingSubsequence {
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
publicintlengthOfLIS_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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
*/
1818
publicclassSingleNumberII {
1919

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

‎MEDIUM/src/medium/SingleNumberIII.java

Lines changed: 3 additions & 0 deletions
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
publicclassSingleNumberIII {
21+
// TODO: study its bit manipulation way, this is a MUST!
22+
23+
2124
//Approach 1: normal hashmap
2225
publicint[]singleNumber(int[]nums) {
2326
Map<Integer,Integer>map =newHashMap();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp