214.Shortest Palindrome || Leetcode || Solved&Explained || C++

  Рет қаралды 9,381

Aanchal Jain

Aanchal Jain

Күн бұрын

Пікірлер: 35
@avneedadhich9185
@avneedadhich9185 Жыл бұрын
My search for it's solution finally came to an end . Thanks for such a great explanation .
@shikharai-tl4vb
@shikharai-tl4vb 3 ай бұрын
you tried well Understanding a problem and effectively explaining it to others are two entirely different skills.
@abhishekverma7604
@abhishekverma7604 Жыл бұрын
thanks for the algorithm,since code part is way too easy and self implementable...
@aanchaljain4610
@aanchaljain4610 Жыл бұрын
Glad it helped!
@materialscience8301
@materialscience8301 Жыл бұрын
thanks for make it. your explanation is very well 😊😊 i hope you will continue ..& grow
@aanchaljain4610
@aanchaljain4610 Жыл бұрын
sure!thank you
@ujwalchawla6721
@ujwalchawla6721 10 ай бұрын
keep going🤘
@VishalYadav-gk1kg
@VishalYadav-gk1kg Жыл бұрын
Very Nice Explanation Mam, Thank you !
@AdityaKumar-be7hx
@AdityaKumar-be7hx Жыл бұрын
Great explanation! Only tip is we can reuse the "t" variable instead of creating a new shorter string. return t.substr(0, s.size()-i)+s;
@aanchaljain4610
@aanchaljain4610 Жыл бұрын
Thank you
@ss8273
@ss8273 Жыл бұрын
thanks sister explained very well🙌🙌
@aanchaljain4610
@aanchaljain4610 Жыл бұрын
Thank you
@ArnabBhadra02
@ArnabBhadra02 3 ай бұрын
Is it possible to solve Using longest common substring between s and rev(s) and after that return the total length -s
@Rahul-kw6zf
@Rahul-kw6zf 7 ай бұрын
Finally After 2 days got h pretty good solution!! Understood❤
@eklavyacodinghub
@eklavyacodinghub 3 ай бұрын
thanks ma'am for making this concept so easy
@srikarsaini
@srikarsaini 3 ай бұрын
10:06 Here we should not increment "j". There is a mistake in explanation. Check the code we are not incrementing "j" there in else statement. we are only changing the pointer "i".
@PankajKumar-pk9dm
@PankajKumar-pk9dm 10 ай бұрын
loved the approach and awesome explanation
@unclezee7369
@unclezee7369 4 ай бұрын
Best explanation so far
@hackingkingdom5634
@hackingkingdom5634 Жыл бұрын
Nice approach Helpful✋
@aanchaljain4610
@aanchaljain4610 Жыл бұрын
Glad it was helpful!
@satyamaditya384
@satyamaditya384 5 ай бұрын
Thank you ma'am for such a great explanation, I had been struggling with KMP too, but now concepts are crystal clear. Thanks a lot!!!
@silent-st1no
@silent-st1no 7 ай бұрын
very very good explanation, thank you so much you are the great❤
@aanchaljain4610
@aanchaljain4610 6 ай бұрын
Thanks ❤
@priyanshupriyam174
@priyanshupriyam174 5 ай бұрын
Thanks a lot ma'am, cleared my kmp concepts well.
@shh442
@shh442 5 ай бұрын
class Solution: def shortestPalindrome(self, s: str) -> str: if s == s[::-1]: return s n = len(s) # Loop to find the largest palindrome prefix for i in range(n, 0, -1): if s[:i] == s[:i][::-1]: break # Add the reverse of the suffix to the start of the string suffix = s[i:] return suffix[::-1] + s
@path8799
@path8799 6 ай бұрын
Understood💯❤
@anonymoustrolls7952
@anonymoustrolls7952 3 ай бұрын
she just taught KMP, good explanation
@hhcdghjjgsdrt235
@hhcdghjjgsdrt235 9 ай бұрын
You got one subscriber
@soumya_suman
@soumya_suman 3 ай бұрын
Thank You !!!
@machans-203
@machans-203 8 ай бұрын
But it doesn't pass all test cases.. for string "aabba" the ans is "abbaabba" how is it possible And also, "abb" -> ans: "bbabb"
@harmankour1711
@harmankour1711 7 ай бұрын
because given is we are allowed to add in the front only and it is passing all the test case just check your code again
@naive-fleek7420
@naive-fleek7420 6 ай бұрын
you are soo smart
@raviroy84
@raviroy84 11 ай бұрын
Clear explaination❤
@Yourcodehelper
@Yourcodehelper 3 ай бұрын
todays daily problem
@VivekSharma-sk3vp
@VivekSharma-sk3vp 3 ай бұрын
Memory Limit Exceeded!!😭😭
Rabin Karp - Shortest Palindrome - Leetcode 214
22:07
NeetCodeIO
Рет қаралды 20 М.
LeetCode was HARD until I Learned these 15 Patterns
13:00
Ashish Pratap Singh
Рет қаралды 730 М.
Жездуха 42-серия
29:26
Million Show
Рет қаралды 2,6 МЛН
БОЙКАЛАР| bayGUYS | 27 шығарылым
28:49
bayGUYS
Рет қаралды 1,1 МЛН
$1 vs $500,000 Plane Ticket!
12:20
MrBeast
Рет қаралды 122 МЛН
32  Minimum number of insertion in a string to make it a palindrome
13:13
Leetcode Question 214 "Shortest Palindrome" in Python
3:28
Ghumman Tech
Рет қаралды 547
7 Outside The Box Puzzles
12:16
MindYourDecisions
Рет қаралды 364 М.
Premature Optimization
12:39
CodeAesthetic
Рет қаралды 848 М.
5 Simple Steps for Solving Any Recursive Problem
21:03
Reducible
Рет қаралды 1,3 МЛН
Learn Coding & Get a Job (in 2025) 🔥
16:54
CodeWithHarry
Рет қаралды 550 М.
Making an Algorithm Faster
30:08
NeetCodeIO
Рет қаралды 196 М.
Longest palindromic substring | Dynamic programming
15:21
Techdose
Рет қаралды 406 М.