Skip to content

Commit 7ba9cdd

Browse files
committed
Comment: Longest Increasing Subsequence
1 parent 159b87f commit 7ba9cdd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

โ€Žlongest-increasing-subsequence/flynn.cppโ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class Solution {
6161
* - nums์˜ ๊ฐ ์›์†Œ๋งˆ๋‹ค memo์— ๋Œ€ํ•ด ์ด๋ถ„ํƒ์ƒ‰์„ ์‹คํ–‰ํ•˜๋ฏ€๋กœ N์ด ์ฆ๊ฐ€ํ•จ์— ๋”ฐ๋ผ ์‹คํ–‰ ์‹œ๊ฐ„์€ N * logN ํ˜•ํƒœ๋กœ ์ฆ๊ฐ€ํ•ฉ๋‹ˆ๋‹ค
6262
* - Space complexity: O(N)
6363
* - memo ๋ฐฐ์—ด์˜ ํฌ๊ธฐ๋Š” N์ด ์ฆ๊ฐ€ํ•จ์— ๋”ฐ๋ผ ์„ ํ˜•์ ์œผ๋กœ ์ฆ๊ฐ€ํ•ฉ๋‹ˆ๋‹ค
64+
* (- predec ๋ฐฐ์—ด์˜ ํฌ๊ธฐ ๋˜ํ•œ N์ด ์ฆ๊ฐ€ํ•จ์— ๋”ฐ๋ผ ์„ ํ˜•์ ์œผ๋กœ ์ฆ๊ฐ€ํ•ฉ๋‹ˆ๋‹ค)
6465
*/
6566

6667
class Solution {

0 commit comments

Comments
ย (0)