REMOVE DUPLICATE LETTERS | LEETCODE 316 | PYTHON STACK SOLUTION

Sdílet
Vložit

Komentáře • 6

  • @sarayarmohammadi3376
    @sarayarmohammadi3376 Před 6 měsíci +2

    Thank you for the clear explanation! It was very easy to understand the way you explained it.

  • @aliglens
    @aliglens Před 3 měsíci +1

    great video! the space complexity is O(n) though, because its bounded by the string builder array which will have n elements in it.

    • @manne4795
      @manne4795 Před 2 měsíci

      The seen set will ensure that no duplicate elements are added to the string builder array. And there are only 26 possible elements as the input string consists of only lowercase English letters. So the space complexity is O(26)=O(1)

  • @YT.Nikolay
    @YT.Nikolay Před 6 měsíci +2

    Hi legend, happy New Year! :)

    • @crackfaang
      @crackfaang  Před 6 měsíci +1

      С Новым Годом :)

    • @YT.Nikolay
      @YT.Nikolay Před 6 měsíci

      @@crackfaang с новым годом my man! ;)