Longest Increasing Subsequence | Dynamic Programming
Вставка
- Опубліковано 12 вер 2024
- 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....
For a better experience and more exercises, VISIT: www.pepcoding....
Have a look at our result: www.pepcoding....
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 .
Seriously, you guys have proved, that Indians have so much talent and some of the best explanations... Sincere thanks for the fantastic videos.
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 )
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.
I have watched several videos but have never seen such a detailed explanation. Hats off to you bro. Thanks a lot.
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
ua-cam.com/users/Pepcodingabout?view_as=subscriber
Your channel deserves Millions of followers 👍
Maybe one day. Thank you so much keep motivating, keep learning and keep loving Pepcoding😊
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.
the best explanation i got for this problem. Sir i have learnt a lot from you. You are really a bliss
sir jis tarah se ap samjhate ho hr problem asan lgti h
yeh question pehli bar itna acche se samajh aya h
Thank you sir for posting amazing content for free 😀😀. I am sure many students will get benefit from these videos.
So nice of you
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 )
Hands down all other channels were jzt telling the algo but not the intimation and the reason but u xplained it well 🔥
Wow!! What else can be better than this explanation.
explained it very well sir.... aapka style hi alg hai smjane ke.
million dollar content. Thank you so much sir.
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?
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.
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!
One of the best teaching style!! Thanks a lot. From Bangladesh :D
काफी स्पस्ट व्यवरण मित्र।
you deserve million subscribers ... lots of love❤️❤️❤️
Summit Bhaiya, Tussi Great Ho!
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
this is by far the best explanation according to me
Sir this question needs to be solved in O(nlog(n)) we need to optimise further
Yes, we can use binary search
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.
Just amazing, you have helped me a lot in clarifying my dp concepts.
Fantastic explanation sir👏👏 thanks a lot
thankyou sir for the amazing tutorials
Kya hi gazab padhate ho sir aap! THANK YOU
mindblowing solution no doubt
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
Superb explanation sir!
Thank You sir !
Sumeet sir, maza aagya!
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.
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.
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. 🙏🙏
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 )
Great Explanation...👍👍
Thanks brother lots of love
Thank you ! very happy I found your channel.
Sir Thank you very much.. Your explanation is the best.
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😊
awesome explanation sir
best content for lis.
superb explained!!!
Glad you think so!
Thank you Sumeet sir
you are simply awesome
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!
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 )
So finally you added TC
Thanks sir
:-) Keep learning
jab bure din aate h toh, Input lena pdhta h - sumeet malik(sept 9,2020)
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/
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 )
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
ua-cam.com/users/Pepcodingabout?view_as=subscriber
Best Explanation!!
You can get more content like this on nados.pepcoding.com
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.
Is it a Dynamic Programing approach?
LEGEND!!
🙏🙏🙏
kuch alag he baat hai!!
Keep learning.
And for better experience, visit nados.io, where you will get well curated content and career opportunities.
Great Explanation .....Deserves ......Integer.MAX_VALUE (no. of likes)
Glad you liked it!
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.
Thank you, sir
@sir where to find your video for nlogn solution for this problem ?
Great teaching! :)
Glad it was helpful!
why the condition is if( arr[j] < arr[i] ) ? Why not if(arr[j]
then it would not be increasing ....
Best explanation 👍
nice explanation
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 - ua-cam.com/users/Pepcodingplaylists?view_as=subscriber
@@Pepcoding definitely
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
Maza aa Gaya dost. What’s the story behind pepcoding?
how can we do "what" and "how" before "why" while solving it on our own.
Can anyone give the link for the NLOGN approach video by sir.....
Sir fabolus 🔥🔥go ahead...🏫
If you like my efforts, I request a review
g.page/Pepcoding/review?rc
Brilliant!!
Sumeet Sir is the OG
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.
Great explanation! Can you please explain nlogn approach also!
Buddy may b we will cover this in level-3 playlist.
Great explanation 👍
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..
W h w concept is goldust
Brilliant
witness the awesomeness
well explained sir! Thankyou
Keep watching
Sir memoization chor du kya
@2:30
Sir, how to print the longest increasing sequence?
understood
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, what is your name? I am a BIG FAN of yours.
I think this algorithm is called the Patience algorithm. Similar to Solitaire game.
Thankyou Sir!
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
sir interviews me yeh chal jayega ya nlogn (Binary Search) waala expect karega interviewer?
beta, unless specifically asked. this is the default one
8/79 Done
SIR iski nlogn wali approach ki bhi video bna do pls.
Using Tabulation Directly How You Decide Wheter The Question Is Solved By 1D,2D or ND array Will Be Used.
Post your queries on nados.pepcoding.com our community will help you out.
sir interview me agar WHAT How pehle btayenge so will not Interviewer think he has crammed it !!!
Yes, you will have to plan and say that I will be explaining it layer by layer. What's, how's and why it
majha aa gya