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

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

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 Ай бұрын
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!
@AdityaKumar-be7hx
@AdityaKumar-be7hx 10 ай бұрын
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 9 ай бұрын
Thank you
@ujwalchawla6721
@ujwalchawla6721 8 ай бұрын
keep going🤘
@VishalYadav-gk1kg
@VishalYadav-gk1kg 10 ай бұрын
Very Nice Explanation Mam, Thank you !
@materialscience8301
@materialscience8301 Жыл бұрын
thanks for make it. your explanation is very well 😊😊 i hope you will continue ..& grow
@aanchaljain4610
@aanchaljain4610 Жыл бұрын
sure!thank you
@eklavyacodinghub
@eklavyacodinghub Ай бұрын
thanks ma'am for making this concept so easy
@Rahul-kw6zf
@Rahul-kw6zf 5 ай бұрын
Finally After 2 days got h pretty good solution!! Understood❤
@satyamaditya384
@satyamaditya384 3 ай бұрын
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!!!
@anonymoustrolls7952
@anonymoustrolls7952 Ай бұрын
she just taught KMP, good explanation
@priyanshupriyam174
@priyanshupriyam174 3 ай бұрын
Thanks a lot ma'am, cleared my kmp concepts well.
@unclezee7369
@unclezee7369 2 ай бұрын
Best explanation so far
@PankajKumar-pk9dm
@PankajKumar-pk9dm 8 ай бұрын
loved the approach and awesome explanation
@shh442
@shh442 2 ай бұрын
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
@ss8273
@ss8273 Жыл бұрын
thanks sister explained very well🙌🙌
@aanchaljain4610
@aanchaljain4610 Жыл бұрын
Thank you
@silent-st1no
@silent-st1no 5 ай бұрын
very very good explanation, thank you so much you are the great❤
@aanchaljain4610
@aanchaljain4610 4 ай бұрын
Thanks ❤
@ArnabBhadra02
@ArnabBhadra02 Ай бұрын
Is it possible to solve Using longest common substring between s and rev(s) and after that return the total length -s
@hackingkingdom5634
@hackingkingdom5634 Жыл бұрын
Nice approach Helpful✋
@aanchaljain4610
@aanchaljain4610 Жыл бұрын
Glad it was helpful!
@hhcdghjjgsdrt235
@hhcdghjjgsdrt235 6 ай бұрын
You got one subscriber
@soumya_suman
@soumya_suman Ай бұрын
Thank You !!!
@path8799
@path8799 4 ай бұрын
Understood💯❤
@naive-fleek7420
@naive-fleek7420 4 ай бұрын
you are soo smart
@Yourcodehelper
@Yourcodehelper Ай бұрын
todays daily problem
@machans-203
@machans-203 6 ай бұрын
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 5 ай бұрын
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
@VivekSharma-sk3vp
@VivekSharma-sk3vp Ай бұрын
Memory Limit Exceeded!!😭😭
@raviroy84
@raviroy84 9 ай бұрын
Clear explaination❤
@srikarsaini
@srikarsaini Ай бұрын
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".
Rabin Karp - Shortest Palindrome - Leetcode 214
22:07
NeetCodeIO
Рет қаралды 17 М.
Amazing remote control#devil  #lilith #funny #shorts
00:30
Devil Lilith
Рет қаралды 14 МЛН
They Chose Kindness Over Abuse in Their Team #shorts
00:20
I migliori trucchetti di Fabiosa
Рет қаралды 12 МЛН
ЛУЧШИЙ ФОКУС + секрет! #shorts
00:12
Роман Magic
Рет қаралды 29 МЛН
LeetCode was HARD until I Learned these 15 Patterns
13:00
Ashish Pratap Singh
Рет қаралды 544 М.
Shortest Palindrome | Leetcode 214
16:13
Techdose
Рет қаралды 3,4 М.
DP 29. Minimum Insertions to Make String Palindrome
12:00
take U forward
Рет қаралды 162 М.
Bjarne Stroustrup: C++ | Lex Fridman Podcast #48
1:47:13
Lex Fridman
Рет қаралды 1 МЛН
214. Shortest Palindrome | Leetcode POTD Explained
19:14
Jeevesh Rai
Рет қаралды 581
Shortest Palindrome O(N)
9:53
IDeserve
Рет қаралды 36 М.
Longest Palindromic Substring - Python - Leetcode 5
8:11
NeetCode
Рет қаралды 549 М.
Amazing remote control#devil  #lilith #funny #shorts
00:30
Devil Lilith
Рет қаралды 14 МЛН