Longest Palindromic Substring Dynamic Programming | Explanation with Code

preview_player
Показать описание

NADOS also enables doubt support, career opportunities and contests besides free of charge content for learning. In this video, we discuss the problem Longest Palindromic Substring using dynamic programming in JAVA. In this problem,

1. You are given a string string.
2. You are required to print the length of longest of palindromic substrings in string string.

#dp #lps #dynamicprogramming

Рекомендации по теме
Комментарии
Автор

sir your patience of explaining problem is outstanding

notinrange
Автор

Well taught Sir...
As always, completely satisfied with the explanation !
Thank you so much !
May God bless you Sir !

vishwashdwivedi
Автор

There is one more way to do it if you store length of longest palindrome sub string
at each spot starting from gap 0 diagonal initializing with 1 and eventually if you get equal extremities you fill the spot by 2 + dp[i+1][j-1] otherwise dp[i+1][j-1] and the final answer you will get at dp[0][n-1].

Btw this is also a nice method and great explanation as well.

projectdemoandpresentation
Автор

Waiting for the manacher's algorithm video, didn't find any good video. And I think you can explain it better than anyone else, on youtube :)

hemantagarwal
Автор

perfect and accurate solution in all other solutions

codeman
Автор

Thank you for a wonderful explanation sir!

Lucifer-jlvh
Автор

Amazing explanation !! Thank you very much :)

mrprime
Автор

bhai sahab kyaa padhaya h yrr, Thats my 4th video for this question Samjh hun aaya jaake, Att krtii

ersarthaksethi
Автор

Linear time solution possible using Manacher's algo. for the same

sayantaniguha
Автор

Thank you sir. Need one suggestion to solve this issue. "Find largest palindrome from [input: str = abaghcmadam, output: madam]

SubrataMandalmandal
Автор

Sir there is a variation in which we return the string instead of length. What's the code changes for that?

kshitijjain
Автор

sir ham same matrix se susbtring aur subsequence dono produce kr rhe hai, thoda confusion ho jata hai

mickyman
Автор

can someone please run the code for bbbab. i am getting 3 but ans will be 4

informative
Автор

Sir, kya aap please top down(recursion wali) approach upload kr skte hain? Usmei easy rehta hai samajhne mei.

nimishgupta
Автор

please number the videos sir..you mention last video but which one is last ?

fahadabdullah
Автор

Sir, I have run this on leetcode it is showing 1544ms run time, faster then only 5%, but your explanation is on another level🥰

codebits
Автор

how to print the Longest Palindromic Substring please explain

harshagarwal
Автор

SIR I REALLY WISH THAT YOU MAKE DP PLAYLIST USING TOP DOWN METHOD...LIKE ADITYA VERMA...I REALLY REALLY WISH THAT....PLEASE DO SIR....DO TEEN DIN LGENGE BAS AAPKO

fahadabdullah
Автор

Very nice sir ..!!
Sir please make a video on
"WORD WRAP" problem.
No one is able to explain it clearly on YouTube

HarivanshKripaVlogs
Автор

Sir, I have run this on leetcode it is showing 1544ms run time, faster then only 5%

codebits
join shbcf.ru