LEETCODE 784 (JAVASCRIPT) | LETTER CASE PERMUTATION

Sdílet
Vložit
  • čas přidán 27. 07. 2024
  • Hey everyone. Check out this in-depth solution for leetcode 784.

Komentáře • 17

  • @thiernodem5681
    @thiernodem5681 Před 17 dny

    I understands codes more when it's been coded than explained on paper or board. You explained it very well, and it's actually easy to comprehend. Thank you!

  • @erajjoan4587
    @erajjoan4587 Před rokem +1

    I managed to recreate the code with some improvements. You can treat the 'slate' like a string and just append the upper/lower/number characters into the recursive call. At the end of the function the return statement will "pop" off the appended string for you (at least from what I could tell). You also don't need to slice or join your built string either. Really cool exercise and I learned a lot.
    Here are my two recursive calls for upper/lower:
    permuteLetterCase(sarray, currentIndex + 1, builtStr + sarray[currentIndex].toUpperCase());
    permuteLetterCase(sarray, currentIndex + 1, builtStr + sarray[currentIndex].toLowerCase());
    And the case for a number:
    permuteLetterCase(sarray, currentIndex + 1, builtStr + sarray[currentIndex]);
    Your explanation helped a ton though.

  • @moistwo
    @moistwo Před 10 měsíci

    Thanks so much for this! With visual representation it's much easier to understand

  • @ruthylevi9804
    @ruthylevi9804 Před 2 lety +1

    so glad I found your channel!!

  • @akhil_sarikonda
    @akhil_sarikonda Před 3 lety +2

    The way you explain is phenomenal. You're a natural teacher!

    • @andygala888
      @andygala888  Před 3 lety

      Thanks, Akhil! Appreciate the support!

  • @RicardoBuquet
    @RicardoBuquet Před rokem

    Great explanation, clear, simple to the point.

  • @harshupadhayay5520
    @harshupadhayay5520 Před rokem

    absolutely beautiful

  • @Big_13ang
    @Big_13ang Před 3 měsíci

    👌👌

  • @SuperDranger
    @SuperDranger Před rokem

    you explain things really well, thank you

  • @heyyyyyworld
    @heyyyyyworld Před 3 lety

    Thank you!

  • @ahmedjahmi5704
    @ahmedjahmi5704 Před 2 lety +1

    Hey Andy, love your tutorials. They’ve been helpful. Can I ask what program you’re using to sketch/draw out the work? And do you have a pen/drawing pad situation?

  • @raysdev
    @raysdev Před 2 lety

    Good stuff! What is an example or problem statement where we would need the Backtrack case you mentioned, which this specific one didn't require it? How would that be handled?

  • @alokgautam859
    @alokgautam859 Před rokem

    please make more videos andy bro ... your tutorial are very hel[full

  • @luiscarlosquesadasequeira1548

    Isn't the Space complexity O(N) , N being the maximum depth of the tree( amount of function calls in the call stack) at any given moment?

  • @rakshashukla1624
    @rakshashukla1624 Před 2 lety

    My code is not running