My search for it's solution finally came to an end . Thanks for such a great explanation .
@shikharai-tl4vb3 ай бұрын
you tried well Understanding a problem and effectively explaining it to others are two entirely different skills.
@abhishekverma7604 Жыл бұрын
thanks for the algorithm,since code part is way too easy and self implementable...
@aanchaljain4610 Жыл бұрын
Glad it helped!
@materialscience8301 Жыл бұрын
thanks for make it. your explanation is very well 😊😊 i hope you will continue ..& grow
@aanchaljain4610 Жыл бұрын
sure!thank you
@ujwalchawla672110 ай бұрын
keep going🤘
@VishalYadav-gk1kg Жыл бұрын
Very Nice Explanation Mam, Thank you !
@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 Жыл бұрын
Thank you
@ss8273 Жыл бұрын
thanks sister explained very well🙌🙌
@aanchaljain4610 Жыл бұрын
Thank you
@ArnabBhadra023 ай бұрын
Is it possible to solve Using longest common substring between s and rev(s) and after that return the total length -s
@Rahul-kw6zf7 ай бұрын
Finally After 2 days got h pretty good solution!! Understood❤
@eklavyacodinghub3 ай бұрын
thanks ma'am for making this concept so easy
@srikarsaini3 ай бұрын
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-pk9dm10 ай бұрын
loved the approach and awesome explanation
@unclezee73694 ай бұрын
Best explanation so far
@hackingkingdom5634 Жыл бұрын
Nice approach Helpful✋
@aanchaljain4610 Жыл бұрын
Glad it was helpful!
@satyamaditya3845 ай бұрын
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-st1no7 ай бұрын
very very good explanation, thank you so much you are the great❤
@aanchaljain46106 ай бұрын
Thanks ❤
@priyanshupriyam1745 ай бұрын
Thanks a lot ma'am, cleared my kmp concepts well.
@shh4425 ай бұрын
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
@path87996 ай бұрын
Understood💯❤
@anonymoustrolls79523 ай бұрын
she just taught KMP, good explanation
@hhcdghjjgsdrt2359 ай бұрын
You got one subscriber
@soumya_suman3 ай бұрын
Thank You !!!
@machans-2038 ай бұрын
But it doesn't pass all test cases.. for string "aabba" the ans is "abbaabba" how is it possible And also, "abb" -> ans: "bbabb"
@harmankour17117 ай бұрын
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