GROUP SHIFTED STRINGS | LEETCODE 249 | PYTHON SOLUTION

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 พ.ย. 2024

ความคิดเห็น • 9

  • @theFifthMountain123
    @theFifthMountain123 7 หลายเดือนก่อน +3

    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.

    • @crackfaang
      @crackfaang  7 หลายเดือนก่อน +1

      No problem, glad you are enjoying the content and finding it useful. Good luck with your Leetcode journey

  • @leizhang799
    @leizhang799 6 หลายเดือนก่อน +6

    e & f diff is 1, not 2

  • @Achtan91
    @Achtan91 9 วันที่ผ่านมา

    "yea the way that you solve this problem is actually really stupid". LOL XD

  • @akilkarthikeyan
    @akilkarthikeyan หลายเดือนก่อน +2

    Is the space complexity not O(n)?

  • @omarllama
    @omarllama 11 วันที่ผ่านมา

    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.

  • @APudgyPanda96
    @APudgyPanda96 9 หลายเดือนก่อน +1

    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

    • @APudgyPanda96
      @APudgyPanda96 9 หลายเดือนก่อน

      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