This problem is pretty good. I liked your solution without using any fancy Python gimmicks. Thanks for the clear solutions! You're helping a lot with my interview prep.
I wouldn't call this is a memorization problem. I solved it with a normalized distance to 'aaaaa...'. Normalization is something that comes way too often in practical situation. This specific problem has been asked 11 times at Meta in the last 3 months. Oh and thanks for all the insighful videos. Your code is super clean compared to other LeetCode youtubers. You have become my reference in the last couple of weeks.
Also for any of my java users who find that this problem is harder in java. For your key instead of using a tuple, just make a string and make a string out of the shifts. For example instead of a tuple of 2,2,2 make a string "2,2,2,". It may look stupid but it works
This problem is pretty good. I liked your solution without using any fancy Python gimmicks. Thanks for the clear solutions! You're helping a lot with my interview prep.
No problem, glad you are enjoying the content and finding it useful. Good luck with your Leetcode journey
e & f diff is 1, not 2
"yea the way that you solve this problem is actually really stupid". LOL XD
Is the space complexity not O(n)?
I thought so too
I wouldn't call this is a memorization problem. I solved it with a normalized distance to 'aaaaa...'.
Normalization is something that comes way too often in practical situation. This specific problem has been asked 11 times at Meta in the last 3 months.
Oh and thanks for all the insighful videos. Your code is super clean compared to other LeetCode youtubers. You have become my reference in the last couple of weeks.
You know a question is stupid when you start off with it's a memorization problem lol. What a stupid broken system leet code is
Also for any of my java users who find that this problem is harder in java. For your key instead of using a tuple, just make a string and make a string out of the shifts. For example instead of a tuple of 2,2,2 make a string "2,2,2,". It may look stupid but it works