Тёмный

Longest palindromic substring | Dynamic programming 

Techdose
Подписаться 171 тыс.
Просмотров 387 тыс.
50% 1

Опубликовано:

 

27 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 479   
@techdose4u
@techdose4u 9 месяцев назад
🟣 JOIN our 𝐋𝐈𝐕𝐄 𝐢𝐧𝐭𝐞𝐫𝐯𝐢𝐞𝐰 𝐭𝐫𝐚𝐢𝐧𝐢𝐧𝐠 𝐩𝐫𝐨𝐠𝐫𝐚𝐦 through whatsapp query: +91 8918633037 🔴 𝐂𝐡𝐞𝐜𝐤𝐨𝐮𝐭 𝐚𝐥𝐥 𝐨𝐮𝐫 𝐂𝐨𝐮𝐫𝐬𝐞𝐬: techdose.co.in/
@hey.............
@hey............. 4 года назад
Kudos for going through the whole input string instead of saying so on and so forth👍
@techdose4u
@techdose4u 4 года назад
😂
@lionelmesssi2959
@lionelmesssi2959 3 года назад
Bro tomorrow my exam is there , exam will consist of coding question in Java. Dynamic programming also there can you help me for exam .
@tekbssync5727
@tekbssync5727 3 года назад
@@lionelmesssi2959 I don't think there will be any football match tomorrow .
@ganesh3761
@ganesh3761 2 года назад
@@tekbssync5727 😅😁
@thecritiquer5976
@thecritiquer5976 11 месяцев назад
I knew from reading other explanations that it was the explanation itself that was hindering everyone including myself. You are so far the only person that actually explained how the dynamic approach works clearly.
@KushalBhatia
@KushalBhatia 3 года назад
Please give this man a medal. Thank you for going through the whole string dry run
@ragas_
@ragas_ 4 года назад
Fact : This guy alone is responsible for more placement offers than all college professors combined ! Change my mind
@techdose4u
@techdose4u 4 года назад
Thanks
@ankitparashar8730
@ankitparashar8730 2 года назад
Professor kaha padhata Sab chutiyapa hai professor
@prajwalraut7480
@prajwalraut7480 Год назад
woahhhh today also this one is best explaination!!!!!!!!!!!!!!
@KevinLin45
@KevinLin45 Год назад
🧠 yelo change krlo :)
@jrajesh11
@jrajesh11 2 года назад
What a great presentation and explanation ! You are just going frame by frame and bringing clarity all the way down deep! Keep doing such great videos for demystifying complex algos.
@sathvikrijo
@sathvikrijo 4 года назад
One of the best explanations for this question, for dp beginners🎉🍾 thanks a lot man💐👍
@sam_s3344
@sam_s3344 3 года назад
Thanks a million for making such an incredible explanation for a GFG code. Sometimes they have good codes, but no explanations or the explanations are not clear enough. This is just so well explained. All your videos are helping so many of us. Keep up the great work!
@techdose4u
@techdose4u 3 года назад
Welcome :)
@aslanfeng413
@aslanfeng413 4 года назад
THE best explanation I’ve heard so far!!!
@techdose4u
@techdose4u 4 года назад
:)
@lionelmesssi2959
@lionelmesssi2959 3 года назад
Bro tomorrow my exam is there , exam will consist of coding question in Java. Dynamic programming also there can you help me for exam .
@bookalicious9849
@bookalicious9849 3 года назад
Excellent explanation ! As a newbie in dp i really was struggling to understand this concept but you made my life easier !!!
@techdose4u
@techdose4u 3 года назад
Thanks
@utkarshsrivastava7885
@utkarshsrivastava7885 3 года назад
You are just explaining the whole concept with patience . thanku for clearing me this algo ,you are just my fav man❤️
@techdose4u
@techdose4u 3 года назад
Welcome :)
@ayyappareddy4461
@ayyappareddy4461 2 года назад
I watched lot of videos for this problem but no one explained like the way you explained.thank you sir
@JSInstructor
@JSInstructor 3 года назад
Thank you so much for the video! I hadn't truly understood the dynamic programming approach to the max palindrome substring problem until I watched your explanation. Thanks again!
@techdose4u
@techdose4u 3 года назад
Welcome :)
@yuganderkrishansingh3733
@yuganderkrishansingh3733 4 года назад
Bro this is the best explanation for the question and I finally understood it. Explaining is an art and making others understand is a superpower and you clearly has it. The video was crisp and so easy to follow. Just loved it. Pls keep making more videos. I know you might be busy with other stuff(I am sure u might be working for some top notch company and if not then you are surely going to be very soon) but pls keep making more videos.
@techdose4u
@techdose4u 4 года назад
Yea sure :)
@abdallaalhag4425
@abdallaalhag4425 5 месяцев назад
I really love how you draw and go through the DP table. I don't see many people explain it that way and it can be very hard to visual or trace through at first. Thanks So much!
@paulcurran3661
@paulcurran3661 3 года назад
Thank you for this, I've had trouble understanding this algorithm in other videos but this is the best explanation I've seen.
@techdose4u
@techdose4u 3 года назад
Thanks :)
@meetmodi2487
@meetmodi2487 3 года назад
New to DP. Was trying to get this approach for 2 hrs.Thanks alot for the explanation.Explained so well,no need to upload the code!
@9669sumit
@9669sumit 2 года назад
Now i know why your video is on the top when searched for this problem. Thanks for such good content.
@ayeshaadhikari6123
@ayeshaadhikari6123 2 года назад
No amount of thanks is ever going to repay the help you're lending us :) Thanks a tonne sir! Keep growing
@chillegaming8250
@chillegaming8250 3 года назад
This is gold! Thank you for that clear explanation.. your DP series is the best out there!
@techdose4u
@techdose4u 3 года назад
Welcome ❤️
@PujaKumari-rp5sg
@PujaKumari-rp5sg 2 месяца назад
If I had a teacher like you during college, I would never doubt myself that I can't learn DSA.
@ZiadGholmish
@ZiadGholmish 4 года назад
Honestly, the best one explained this question
@techdose4u
@techdose4u 4 года назад
Thanks :)
@ajeetshankar7946
@ajeetshankar7946 2 года назад
Quality content with best explanation compared to every other video, special thanks to you!!
@abhishekbaral4699
@abhishekbaral4699 3 года назад
really understood the concepts of DP with clarity. Never visualized like this before.. Thanks
@manojrajasekar6035
@manojrajasekar6035 4 года назад
Best Explanation ever ! Please continue doing this. Thank you :)
@techdose4u
@techdose4u 4 года назад
Yea..... Thanks :)
@omerfarukbuyukbas
@omerfarukbuyukbas 2 года назад
It is really the best explanation I've ever seen in this subject! Thank you!
@tigerbear3038
@tigerbear3038 2 года назад
Excellent explanation! Really appreciate that you went step by step even though it seemed tedious but it made it easy to follow.
@techdose4u
@techdose4u 2 года назад
Thanks ☺️
@TravelWithAmitDubey
@TravelWithAmitDubey 4 года назад
I liked the way you explained this problem, best explanation I ever found for this problem.
@techdose4u
@techdose4u 4 года назад
Thanks :)
@shrutibansal5261
@shrutibansal5261 2 года назад
best video I have seen so far for understanding dp using a table
@satvik_b
@satvik_b Год назад
good explanation! The reason this is a dp problem is that it has over lapping sub problems. For substring from index 1,5 we need to check if substr from index 2,4 is palindrome or not and for substr 0,6 we would not compute for substr 1,5. So it will take O(1) time instead of O(n).
@jaatharsh
@jaatharsh 3 года назад
Thanks, TechDose, crisp n clear explanation, exactly what I was looking for, keep uploading!
@techdose4u
@techdose4u 3 года назад
Thanks
@atefnazi753
@atefnazi753 3 года назад
How you explain these things so clearly..... I must say you are very underrated
@shubhammahindru3563
@shubhammahindru3563 9 месяцев назад
This is the best expalantion for this question on youtube, thanks mate
@krithickkrishnagiri6371
@krithickkrishnagiri6371 4 года назад
finally got the concept behind the dynamic programming. Thank you
@techdose4u
@techdose4u 4 года назад
Welcome :)
@lionelmesssi2959
@lionelmesssi2959 3 года назад
Bro tomorrow my exam is there , exam will consist of coding question in Java. Dynamic programming also there can you help me for exam .
@mychannelyashi2441
@mychannelyashi2441 3 года назад
This channel is now becoming my fav channel,,, thanks for explaining the concept so easily .
@techdose4u
@techdose4u 3 года назад
Welcome :)
@lionelmesssi2959
@lionelmesssi2959 3 года назад
Bro tomorrow my exam is there , exam will consist of coding question in Java. Dynamic programming also there can you help me for exam .
@harshitbhatt5875
@harshitbhatt5875 3 года назад
Please, if possible, explain how you approach a problem and come up with solutions too as it'll help in developing our programming logic as well. Thanks for the great vids, keep em comin'! :)
@techdose4u
@techdose4u 3 года назад
Sure :)
@prasitamukherjee5864
@prasitamukherjee5864 4 года назад
Thank you so much! It was crystal clear.
@arjunreddy3615
@arjunreddy3615 4 года назад
Explained very well.. I have written the code using the instructions and it is working well strings of random sizes.. Thank you...
@techdose4u
@techdose4u 4 года назад
Welcome :)
@AbhishekA-81
@AbhishekA-81 3 года назад
One of the best teachers found on RU-vid 👍🏻
@techdose4u
@techdose4u 3 года назад
Thanks :)
@aakashparmar560
@aakashparmar560 2 года назад
God-level explanation.!! If possible please keep these videos coming.
@radhu8
@radhu8 3 года назад
Can't explain how thankful I am for your explanations!
@techdose4u
@techdose4u 3 года назад
Welcome :)
@lionelmesssi2959
@lionelmesssi2959 3 года назад
Bro tomorrow my exam is there , exam will consist of coding question in Java. Dynamic programming also there can you help me for exam .
@darshansimha2166
@darshansimha2166 3 года назад
The best explanation so far!
@0laoye
@0laoye 7 месяцев назад
what a great explanation! love your divide and conquer techniques
@beautifultime9031
@beautifultime9031 4 года назад
The only video that explains the DP matrix and each step of the algorithm. Thanks so much.
@techdose4u
@techdose4u 4 года назад
Welcome :) I always explain the intuition and steps of dp matrix with reason for formulations.
@Star_Bawa9
@Star_Bawa9 2 года назад
Thanks , you get straight to the point continue like this
@CodeSuccessChronicle
@CodeSuccessChronicle 3 года назад
thanks for going through the whole string. Thank you for all your efforts 🙏
@techdose4u
@techdose4u 3 года назад
Welcome :)
@lionelmesssi2959
@lionelmesssi2959 3 года назад
Bro tomorrow my exam is there , exam will consist of coding question in Java. Dynamic programming also there can you help me for exam .
@AmazingWorld-fw9oc
@AmazingWorld-fw9oc 3 года назад
I'm glad I found this channel.
@techdose4u
@techdose4u 3 года назад
😊
@kumarc4853
@kumarc4853 2 года назад
thank you Tech dose, I cracked google and linkedin. Learned a lot from your videos and explanations
@techdose4u
@techdose4u 2 года назад
Congratulations 🤗💥🎉
@prateeksrivastava1577
@prateeksrivastava1577 3 года назад
One of the best explanation for this problem.....Thanks bro...!!!!
@collins4359
@collins4359 2 года назад
thanks for the explanation. was so good I didn't need help writing the code.
@dattatreyapujar4068
@dattatreyapujar4068 4 года назад
Nice work. Hope to see your channel grow beyond numbers.
@techdose4u
@techdose4u 4 года назад
Thanks buddy :)
@rajeshseptember09
@rajeshseptember09 2 года назад
outstanding explanation man !!! Keep up the great job !
@guruvigneshnagaraj8501
@guruvigneshnagaraj8501 4 года назад
Perfect Explanation. Thank you!!
@techdose4u
@techdose4u 4 года назад
Welcome :)
@satweek123
@satweek123 4 года назад
Really good explanation @techdose. i feel more confident with DP now
@anitapanda9267
@anitapanda9267 3 года назад
Sir...how beautifully u explained the logic...Thank you
@techdose4u
@techdose4u 3 года назад
Welcome :)
@sakshiramsinghani5284
@sakshiramsinghani5284 3 года назад
Thanks a lot, you've explained it really well. It's very helpful.
@techdose4u
@techdose4u 3 года назад
Welcome :)
@manishbolbanda9872
@manishbolbanda9872 Год назад
wow this is gold. such a great solution. Thanks a ton. i usually approach dp problem with rec first then memoization then tabulaiton. bt this is more like concrete tabulation solutiion.
@jhilikkundu3158
@jhilikkundu3158 3 года назад
Noone says that row is the starting pos and column ending. You just clear my doubt in first few minutes. Thank you again.
@techdose4u
@techdose4u 3 года назад
Welcome :)
@saicharanpinninti548
@saicharanpinninti548 5 месяцев назад
very good explanation and this was my first dp problem really understands really well
@ahasunos5914
@ahasunos5914 2 года назад
He made this problem a cake walk. Thanks man.
@techdose4u
@techdose4u 2 года назад
Welcome 😀
@ahasunos5914
@ahasunos5914 2 года назад
@@techdose4u 🙌
@HarinathSrinivas
@HarinathSrinivas 4 года назад
For length 3 also it is enough to check only if characters are equal, like length 2 as diagonal is always 1.
@gmdz0ji336
@gmdz0ji336 4 года назад
Best explanation ever!! Thank you sooo much :D
@techdose4u
@techdose4u 4 года назад
Welcome :)
@yousufahmed985
@yousufahmed985 6 месяцев назад
You must be really smart to come up with solutions like these
@msreenivasaprasad2214
@msreenivasaprasad2214 4 года назад
Very clearly explained . Thanks for helping me out brother.
@techdose4u
@techdose4u 4 года назад
Welcome
@sanskaripatrick7191
@sanskaripatrick7191 2 месяца назад
best explanation of this dp problem. Thank you so much🙏
@sangramkesharighosh1698
@sangramkesharighosh1698 Год назад
Your explaining skill is mind-blowing 😁
@piyusgupta9498
@piyusgupta9498 4 года назад
Awesome explanation, finally I understood, thanks.
@techdose4u
@techdose4u 4 года назад
Welcome :)
@ashwinraj8918
@ashwinraj8918 4 года назад
Flawless explanation!!. Thank You!
@techdose4u
@techdose4u 4 года назад
Welcome :)
@Surya-np1bb
@Surya-np1bb Год назад
Awesome buddy! Thanks for this
@vivek.tiwary
@vivek.tiwary 3 года назад
Could not find better explanation than this.
@pathevolutionnetwork
@pathevolutionnetwork 3 года назад
This was great !! Thanks for helping me understand this one
@techdose4u
@techdose4u 3 года назад
Welcome :)
@NirmalSilwal
@NirmalSilwal Год назад
Java solution | DP thank you for the great explanation too :) 🔥 public String longestPalindrome(String s) { int n = s.length(); if (n == 1) return s; // dp[1][2] represents substring of s in range [1,2] inclusive is palindrome or not // 1 indicates palindrome in dp array and 0 represents not a palindrome int[][] dp = new int[n][n]; int start = 0, end = 0; // index of answer in s for (int i = 0; i < n; i++) { // start position in s // for upper triangular matrix for (int j = i; j >= 0; j--) { // end position in s if (i == j) dp[i][j] = 1; else if (i - j == 1) { // for substring of length 2 in upper traingular matrix if (s.charAt(i) == s.charAt(j)) dp[i][j] = 1; } // check border character and substring inside current border indicated by i and j else if (s.charAt(i) == s.charAt(j) && dp[i - 1][j + 1] == 1) { dp[i][j] = 1; } // tracking maximum length for substring with index in s if (dp[i][j] == 1 && i - j > end - start) { start = j; end = i; } } } return s.substring(start, end + 1); }
@hassaankhalid873
@hassaankhalid873 2 года назад
This was great, sir. Thank you.
@SalmanKhan-ol4sm
@SalmanKhan-ol4sm 3 года назад
This is the best explanation ever.
@techdose4u
@techdose4u 3 года назад
Thanks
@mukeshbalaji04
@mukeshbalaji04 3 года назад
you have the best dynamic programming playlist ever
@techdose4u
@techdose4u 3 года назад
Thanks
@deveshagarwal660
@deveshagarwal660 4 года назад
Amazing video and nicely explained. Great job
@techdose4u
@techdose4u 4 года назад
Thanks :)
@diasposangare1154
@diasposangare1154 3 месяца назад
the best explanation i found
@Star_Bawa9
@Star_Bawa9 2 года назад
That was a brilliant Explaination...
@srinaath9845
@srinaath9845 4 года назад
Thank you bro. Awesome explanation 👏
@techdose4u
@techdose4u 4 года назад
Thanks :)
@padmaraghunathan4849
@padmaraghunathan4849 3 года назад
Such a great teacher 🙏🙏🙏🙏🙏
@AbhishekKumar-sp5yz
@AbhishekKumar-sp5yz 4 года назад
your explanation is amazing.
@techdose4u
@techdose4u 4 года назад
:)
@nikhilkaushal1615
@nikhilkaushal1615 2 года назад
Nicely explained! Thank you!
@techdose4u
@techdose4u 2 года назад
Welcome 😀
@SreyesSrinivasan
@SreyesSrinivasan 2 года назад
Fabulous explanation!
@harshpanwar1550
@harshpanwar1550 3 года назад
Thank u so much sir.....You explained in a wonderful way!!!
@techdose4u
@techdose4u 3 года назад
Thanks
@mikeerazo76
@mikeerazo76 2 года назад
Wonderful explanation!
@HimanshuKumar-xz5tk
@HimanshuKumar-xz5tk 3 года назад
Finally I understood this problem!!!!!!!!!!!!!!!! THANKSSSSSSSSSSSSSS MANNNNNN
@techdose4u
@techdose4u 3 года назад
Welllllllcomeeeeeee
@Bobby-mf6fw
@Bobby-mf6fw 4 года назад
Best video of this programon youtube. Thankyou Sir
@techdose4u
@techdose4u 4 года назад
Welcome :)
@bhumberg3243
@bhumberg3243 3 года назад
The BEST explanation ...tqsm
@technovatives
@technovatives 3 года назад
best Explanation I have ever seen
@techdose4u
@techdose4u 3 года назад
Thanks
@ajayladhar731
@ajayladhar731 2 года назад
thank you brother for detailed explanation
@Mandeepsingh-jo5cf
@Mandeepsingh-jo5cf 3 года назад
Thanks man for these explanations.
@techdose4u
@techdose4u 3 года назад
Welcome :)
@crankyinmv
@crankyinmv 3 года назад
Thanks. Very useful. However, brute force can be done in O(n^2): for(0 through length of string-1) find the longest palindrome whose middle is in that position if(longer than the previous max) save the start and end indexes return substring at the saved start and end indexes
@geeteshchallur1034
@geeteshchallur1034 2 года назад
So how is dp appoach better than this approach?
@rahul88632
@rahul88632 Год назад
Thanks for simple explanation
@kentsang9376
@kentsang9376 3 года назад
Very nice explanation, thank you so much!!!
@techdose4u
@techdose4u 3 года назад
Welcome :)
@noobninja4882
@noobninja4882 4 года назад
THANKS A LOT FOR THE BEST EXPLANATION
@techdose4u
@techdose4u 4 года назад
Welcome :)
@nishantsngl
@nishantsngl 4 года назад
Superb Bro... best ever explanation for this problem.
@techdose4u
@techdose4u 4 года назад
Thanks :)
@pavanrao5896
@pavanrao5896 4 года назад
One of the best explanations I've come across! Do you have a video for O(n) complexity as well?
@techdose4u
@techdose4u 4 года назад
No, till now I have not made any video on manacher's algo.
@rishilapsiwala9503
@rishilapsiwala9503 2 года назад
Precise explanation man
@vancedaccount7951
@vancedaccount7951 Год назад
Thx for this Video man.
@VikasKumar-nb2pn
@VikasKumar-nb2pn 4 года назад
Thanks man ... Awesome explanation...
@techdose4u
@techdose4u 4 года назад
Thanks :)
Далее
Наше обычное утро 💕
00:42
Просмотров 551 тыс.
🎙СТРИМ на 4 МИЛЛИОНА🍋
3:12:45
Просмотров 1,3 млн
The ORDER BY Algorithm Is Harder Than You Think
13:46
Leetcode 5. Longest Palindromic Substring
23:52
Просмотров 44 тыс.
Longest Palindromic Substring (Algorithm explained)
11:17
Hash Tables and Hash Functions
13:56
Просмотров 1,5 млн
The Algorithm Behind Spell Checkers
13:02
Просмотров 409 тыс.
Longest common substring | Dynamic programming
20:47
Просмотров 66 тыс.
Наше обычное утро 💕
00:42
Просмотров 551 тыс.