Number of Longest Increasing Subsequence | LeetCode 673 | C++, Java, Python

preview_player
Показать описание
Time Complexity = O(n^2)
Space Complexity = O(n)

**** Best Books For Data Structures & Algorithms for Interviews: **********
*****************************************************************************

Number of Longest Increasing Subsequence | Leetcode 673
Facebook Coding Interview question,
google coding interview question,
leetcode,
Number of Longest Increasing Subsequence,
Number of Longest Increasing Subsequence C++,
Number of Longest Increasing Subsequence Java,
Number of Longest Increasing Subsequence python,
Number of Longest Increasing Subsequence solution,
673. Number of Longest Increasing Subsequence,

#CodingInterview #LeetCode #Google #Amazon
Рекомендации по теме
Комментарии
Автор

13:50 -- You are doing this, this, this this this .... i am like what .. what.. what what what. Its not clear sir that which this, this this you are referring to. Can you please explain a bit here with example?

praveen
Автор

*Best feeling* :when you are watching a video and suddenly get another notification that knowledge centre posted another video 😍😍

shashanksabharwal
Автор

1, 3, 5, 4 => as per your logic cnt =1 always but we can form length of 3 by 2 subsequence=> {1, 3, 5} {1, 3, 4}

amitranjan
Автор

Sir I thinks cnt[i] is equal to the no of lis ending at that ith index and having the length of lis[i]

paragroy
Автор

can you follow i, j heirarchi in for loops next time, we have mental model of imagining I for first for loop, so its confusing to understand the code. you approach is clear though, .

animatedzombie
Автор

I think there is no need of count array because in last we are traversing our lis with maxelement

sangam