Longest Increasing Subsequence | Dynamic Programming
Vložit
- čas přidán 8. 09. 2020
- Please consume this content on nados.pepcoding.com for a richer experience. It is necessary to solve the questions while watching videos, nados.pepcoding.com enables that.
NADOS also enables doubt support, career opportunities and contests besides free of charge content for learning. In this video, we explain about subsequences and discuss the Longest Increasing Subsequence problem in dynamic programming, In this problem,
1. You are given a number n, representing the number of elements.
2. You are given n numbers, representing the contents of array of length n.
3. You are required to print the length of longest increasing subsequence of array.
To submit this question, click here: www.pepcoding.com/resources/d...
For a better experience and more exercises, VISIT: www.pepcoding.com/resources/o...
Have a look at our result: www.pepcoding.com/placements
Follow us on our FB page: / pepcoding
Follow us on Instagram: / pepcoding
Follow us on LinkedIn: / pepcoding-education
I have never commented on any channel but you are the mentor I was looking for years. I have watched many youtube videos on dp, no one explained the 'WHY'. Great explanation, great content...specially the way of teaching. JABRA FAN BANGYA DADA .
I have watched several videos but have never seen such a detailed explanation. Hats off to you bro. Thanks a lot.
Seriously, you guys have proved, that Indians have so much talent and some of the best explanations... Sincere thanks for the fantastic videos.
I am watching tutorials from last couple of years, you are one of the best teacher. Amazing
wow, this cheers me up. I am glad we at pepcoding could be of help to you. Keep learning. Also, recommend us to your juniors and peers, they may also benefit.
The best lecture series available on youtube for DP
Thankyou beta,
I am glad you liked it. I also hope that you are watching till end.
If you like our efforts, will you like to write a few words about us here (www.quora.com/How-do-I-start-learning-or-strengthen-my-knowledge-of-data-structures-and-algorithms )
Hands down all other channels were jzt telling the algo but not the intimation and the reason but u xplained it well 🔥
the best explanation i got for this problem. Sir i have learnt a lot from you. You are really a bliss
Wow!! What else can be better than this explanation.
I tried to look for the answer in many other channels but no one explained the way you did from scratch. Thank you sir it's really amazing
I am glad you liked it. I also hope that you are watching till end and trying to understand the what, how and especially why of the problem.
If you like our efforts, we request a review
g.page/Pepcoding/review?rc
You can subscribe to our channel here
czcams.com/users/Pepcodingabout?view_as=subscriber
sir jis tarah se ap samjhate ho hr problem asan lgti h
yeh question pehli bar itna acche se samajh aya h
Very nice and crystal clear explanation. I loved the concept of answering the 'what' and 'how' and then answering the 'why' of the problem. Loved it!!
Thankyou beta!
I am glad you liked it. It's all with the effort and hardwork from our brilliant mentors(Subhesh sir and all the other teacher of pepcoding). If you like our efforts, will you like to write a few words about us here (www.quora.com/How-do-I-start-learning-or-strengthen-my-knowledge-of-data-structures-and-algorithms )
Thank you ! very happy I found your channel.
Just amazing, you have helped me a lot in clarifying my dp concepts.
this is by far the best explanation according to me
One of the best teaching style!! Thanks a lot. From Bangladesh :D
Your channel deserves Millions of followers 👍
Maybe one day. Thank you so much keep motivating, keep learning and keep loving Pepcoding😊
million dollar content. Thank you so much sir.
Thank you sir for posting amazing content for free 😀😀. I am sure many students will get benefit from these videos.
So nice of you
explained it very well sir.... aapka style hi alg hai smjane ke.
Kya hi gazab padhate ho sir aap! THANK YOU
you deserve million subscribers ... lots of love❤️❤️❤️
काफी स्पस्ट व्यवरण मित्र।
I'm literally amazed sir ji! I watched this video at almost 3:50 am in the middle of the night when I was struggling to sleep, and I still can't believe I actually understood the whole approach and concept of this popular classical dp problem. Thankyou so much Sir ♥️ @pepcoding you simply rock! Can't wait to mark the submission for this question on your platform in the morning ⚡⚡
That really means a lot. For better experience and well organised content sign up on nados.io and start learning.
Thanks brother lots of love
Fantastic explanation sir👏👏 thanks a lot
Sir Thank you very much.. Your explanation is the best.
Great Explanation sir! i will not believe if anyone says that he can explain this question better than you, keep going sir, Awesome !!
for better experience why don't you use this same content on nados.pepcoding.com?
thankyou sir for the amazing tutorials
Sumeet sir, maza aagya!
best content for lis.
superb explained!!!
Glad you think so!
really brother i watched like 7 videos to understand what u said it was nice
Thank you so much Bhai keep motivating, keep learning and keep loving Pepcoding😊
You are guru of coding ...Best teacher ever
wow, this cheers me up. I am glad we at pepcoding could be of help to you. Keep learning. Also, recommend us to your juniors and peers, they may also benefit
Great Explanation...👍👍
Awesome explanation sirji ❤️
mindblowing solution no doubt
Thank you Sumeet sir
Superb explanation sir!
Thank your sir for such logical explanation Glad I reached to your videos!
Thankyou beta!
I am glad you liked it. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem.
If you like our efforts, will you like to write a few words about us here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )
Thank You sir !
So finally you added TC
Thanks sir
:-) Keep learning
Great explanation 👍
awesome explanation sir
you are simply awesome
Amazing explanation. Thank you.
I am glad you liked the content and thankyou for appreciating😊
If you like our efforts, will you like to write a few words about us here (www.quora.com/How-do-I-start-learning-or-strengthen-my-knowledge-of-data-structures-and-algorithms )
Best explanation 👍
Thank you, sir
Explanation is just awesome...Thank you sir.
You are most welcome and If you like our efforts, please upvote the comments written by the students about Pepcoding here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )
Thanks for the explanation really helpful.
I am glad you liked it. I also hope that you are watching till end and trying to understand the what, how and especially why of the problem.
If you like our efforts, we request a review
g.page/Pepcoding/review?rc
You can subscribe to our channel here
czcams.com/users/Pepcodingabout?view_as=subscriber
One thing that makes u different and beautiful is thinking about what ..why and how of problem.lots of love sir ji
Thank you for appreciating.
The love and respect which I get from you people keep me highly motivated and the same I am able to forward It to you people through my videos.
So, keep motivating, keep learning and keep loving Pepcoding😊
Dear Sumeet, may you attain eternal peace, longevity, health and vitality.
Brilliant!!
Thankyou Sir!
Great teaching! :)
Glad it was helpful!
Again hatsoff to you sir, your explanation is so raw , so down to earth, no rocket science i m literally now a very big fan of your explanation . Yesterday i watched kadanes algorithms u nailed it today i saw this video u again blown my mind , your concept of What Why and How is very much helpfull. Knowledge which u deliver to us in such a systematic way is awesome it got smoothly into my head .
I m realising it was just hype about DP after seeing ur explanation i m too much Nischint. Thankx a lot sir.
Sir please explain this Q in NLogN also, I m now habituated to your way of explanation so now no videos are suiting my slow brain.
Thankyou beta, for such kind words.
I am glad you liked it. If you like our efforts, will you like to write a few words about us here (www.quora.com/How-do-I-start-learning-or-strengthen-my-knowledge-of-data-structures-and-algorithms )
Sure sir.
Same i love his videos!
Sir fabolus 🔥🔥go ahead...🏫
If you like my efforts, I request a review
g.page/Pepcoding/review?rc
nice explanation
Best Explanation!!
You can get more content like this on nados.pepcoding.com
Brilliant explaination
Glad you love the explanation.
For better experience and well organised content sign up on nados.io and don't forget to follow us on Instagram instagram.com/pepcoding/
Great way of explaining. This way complex problems become very simple.
Glad it was helpful!
Keep learning.
And for better experience and well organised content visit nados.pepcoding.com
@@Pepcoding Can you please provide the solution for this problem for n(log n) approach
For better insight, visit nados.pepcoding.com, , post your doubts, community will help you out there.
well explained sir! Thankyou
Keep watching
can be done in O(N log N) if we want to find only the length
using a temp array and a lower bound
1. push the first element in the array
2. now loop(1,N) if arr.back() just push curr_element to the arr
else find lower bound of curr_element from arr and replace with curr_element
hopefully i make sense :|
hanji, have been mentioned in the video ki iska better approach hai isse.
Sirji ek baar mein samajh aa gya recursion/memoization se tle aa rha tha, tabulation sahi hai!
Glad to hear that for better experience and well organised content visit - nados.io
can you pls share recursive/ memoized solution for this problem. 🙏🙏
LEGEND!!
🙏🙏🙏
jab bure din aate h toh, Input lena pdhta h - sumeet malik(sept 9,2020)
Thanks for sharing these content sir!
Glad you like them! and If you like the content could you post something on LinkedIn about us? This will help us in reaching out to more people and help a lot of other students as well
Something like this
Sumeet Malik from Pepcoding is making all his content freely available to the community
You can check it out here - www.pepcoding.com/resources
/
Also, this is the youtube channel - czcams.com/users/Pepcodingplaylists?view_as=subscriber
@@Pepcoding definitely
witness the awesomeness
thank you sir.
Hope you love the explanation, for better experience and well organised content sign up on nados.io and start learning.
Brilliant
Maza aa Gaya dost. What’s the story behind pepcoding?
kuch alag he baat hai!!
Keep learning.
And for better experience, visit nados.io, where you will get well curated content and career opportunities.
sir can hashmap be used key will be value in array and value will be a integer array if while traversing greater is found pus it into arraylist and return the size of maximum length arraylist
Great explanation again!!! Also sir, DP has only been taught through questions? Or is there theory about it too, if yes where can i find it.
Thankyou beta!
I am glad you liked it.
Will you like to write a few words about us here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms)
Hanji, It is taught through questions only, basically jha bhi overlapping subproblem dikhe apko, vha dp lgate h hum.
Adbhut
Great explanation! Can you please explain nlogn approach also!
Buddy may b we will cover this in level-3 playlist.
@sir where to find your video for nlogn solution for this problem ?
sir,please do upload video on this topic using recursion with memorization.
Beta, recursion main itne question ho gye h, ki bacho ki thinking capability bn jaye ki vo naye question ki recursion khud se soch paye, issliye dynamic programming ki series main directly dp solution krvaya gya h. But if you are facing some problem or for clearing your doubts, you can join our community on telegram - t.me/pepcoding
@@Pepcoding sir recursion ki playlist main mostly recursion on the way wale questions hai ,kuch faith wale thode add kr dijiye sir jisse dp mai bhi memoise krne mai problem na ho please
Can anyone give the link for the NLOGN approach video by sir.....
understood
8/79 Done
Great Explanation .....Deserves ......Integer.MAX_VALUE (no. of likes)
Glad you liked it!
Can this question be done with lcs of original array with sorted array? I am facing some problems if there are repeated items present in the array.
Beta, I regret to inform you that, I won't be able to answer/solve the personal doubts of each and every student over here. For clearing your doubts, you can join our community on telegram - t.me/pepcoding.
Nice lecture
Thankyou beta!
I am glad you liked it. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem.
If you like our efforts, will you like to write a few words about us here (www.quora.com/How-do-I-start-learning-or-strengthen-my-knowledge-of-data-structures-and-algorithms )
W h w concept is goldust
sir leetcode pe ek test case pass nhi ho raha jab sare elements same hai array mei like(4,4,4,4) to ans one hona chahiye but 4 aa raha hai..
Thankyou
You are welcome and If you like our efforts, please upvote the comments written by the students about Pepcoding here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )
Very nice explanation...
Thankyou beta,
Glad to know that you liked the content and thank you for appreciating. If you like our efforts, will you like to write a review about us here - g.page/Pepcoding/review?rc
@@Pepcoding sure sir
majha aa gya
Great explaination sir 🔥, sir can u please explain the binary search wala method of the above problem
Thankyou buddy!
I regret to inform you that, I won't be able to answer/solve the personal doubts of each and every student over here. For clearing your doubts, you can join our community on telegram - t.me/pepcoding.
Sir could you please teach for the c and c++ background students also..i.e., as you are using int and Integer .. those are different for java nd c++..so y could not you use -1 insted of null..?
you can use min value, and add a check at end, if it is still equal to min value. -1 won't work if array has negative numbers.
Sir this question needs to be solved in O(nlog(n)) we need to optimise further
Yes, we can use binary search
Best video
I am glad you liked it. I also hope that you are watching till end and trying to understand the what, how and especially why of the problem.
If you like our efforts, we request a review
g.page/Pepcoding/review?rc
You can subscribe to our channel here
czcams.com/users/Pepcodingabout?view_as=subscriber
Sumeet Sir is the OG
how can we do "what" and "how" before "why" while solving it on our own.
Sir, how to print the longest increasing sequence?
Sir, what is your name? I am a BIG FAN of yours.
Hi sir it would be of great help ,if you would help us with notes such as algorithm ,although it is quite clear from the code ,but looking back after some time say 6 months back, sometimes things vanish ,so it's helpful to take a basic key important note .Getting them would be of help
Noted
SIR iski nlogn wali approach ki bhi video bna do pls.
Is it a Dynamic Programing approach?
I think this algorithm is called the Patience algorithm. Similar to Solitaire game.
24:58, we can write int omax=1; at line number 16.
what if input array length is itself 0 :))
@@vinayjangra1401 leetcode problem number 300, please do check the constraints regarding the length of an array!