Buddy Strings | Leet code 859 | Theory explained + Python code

preview_player
Показать описание
This video is a solution to Leet code 859, Buddy Strings. I explain the question, go over how the logic / theory behind solving the question and finally solve it using Python code.

Comment below if you have a better solution to this problem!

Let me know if you have any feedback and don't forget to subscribe for more videos!

Code:

Time Stamps:
0:00 Question Explained
2:30 Solution + code

More leetcode questions solved:

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

Hello Sai,
I was browsing for answer, everybody used way too complex logic ..
your solution was logical and simple to understand

finwwwfinwww
Автор

Your leetcode videos are very helpful. Thanks

arielzhen
Автор

Hello Sai,
Thanks for the video, it helps me a lot.
it would be really appreciated if you could explain more why we have
difference[0] == difference[-1][::-1], I am not to sure what does difference[-1][::-1] do
Thank you so much!

CK-buwh
Автор

Do you have the premium version btw?
if yes can you also post the companies that questions were asked in ? in description or thumbnail?
if its possible

pythonenthusiast