Розмір відео: 1280 X 720853 X 480640 X 360
Показувати елементи керування програвачем
Автоматичне відтворення
Автоповтор
My search for it's solution finally came to an end . Thanks for such a great explanation .
you tried well Understanding a problem and effectively explaining it to others are two entirely different skills.
thanks for the algorithm,since code part is way too easy and self implementable...
Glad it helped!
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;
Thank you
keep going🤘
Very Nice Explanation Mam, Thank you !
thanks for make it.your explanation is very well 😊😊i hope you will continue ..& grow
sure!thank you
thanks ma'am for making this concept so easy
Finally After 2 days got h pretty good solution!!Understood❤
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!!!
she just taught KMP, good explanation
Thanks a lot ma'am, cleared my kmp concepts well.
Best explanation so far
loved the approach and awesome explanation
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
thanks sister explained very well🙌🙌
very very good explanation, thank you so much you are the great❤
Thanks ❤
Is it possible to solve Using longest common substring between s and rev(s) and after that return the total length -s
Nice approach Helpful✋
Glad it was helpful!
You got one subscriber
Thank You !!!
Understood💯❤
you are soo smart
todays daily problem
But it doesn't pass all test cases.. for string "aabba" the ans is "abbaabba" how is it possibleAnd also, "abb" -> ans: "bbabb"
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
Memory Limit Exceeded!!😭😭
Clear explaination❤
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".
My search for it's solution finally came to an end . Thanks for such a great explanation .
you tried well Understanding a problem and effectively explaining it to others are two entirely different skills.
thanks for the algorithm,since code part is way too easy and self implementable...
Glad it helped!
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;
Thank you
keep going🤘
Very Nice Explanation Mam, Thank you !
thanks for make it.
your explanation is very well 😊😊
i hope you will continue ..& grow
sure!thank you
thanks ma'am for making this concept so easy
Finally After 2 days got h pretty good solution!!
Understood❤
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!!!
she just taught KMP, good explanation
Thanks a lot ma'am, cleared my kmp concepts well.
Best explanation so far
loved the approach and awesome explanation
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
thanks sister explained very well🙌🙌
Thank you
very very good explanation, thank you so much you are the great❤
Thanks ❤
Is it possible to solve
Using longest common substring between s and rev(s) and after that return the total length -s
Nice approach Helpful✋
Glad it was helpful!
You got one subscriber
Thank You !!!
Understood💯❤
you are soo smart
todays daily problem
But it doesn't pass all test cases.. for string "aabba" the ans is "abbaabba" how is it possible
And also, "abb" -> ans: "bbabb"
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
Memory Limit Exceeded!!😭😭
Clear explaination❤
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".