Next Permutation | Leet code 31 | Theory explained + Python code

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

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

  • @perelium-x
    @perelium-x 2 หลายเดือนก่อน +1

    Bravooooooo! I cannot thank you enough. I finally understand. Subbed & Liked! Keep up the gr8 vids bro

  • @paritoshkumar5005
    @paritoshkumar5005 2 ปีที่แล้ว +2

    absolute genius explanation man
    watched 10 other videos but was about to quit on this question
    and then comes sai to the rescue
    thanks big man

  • @franklinoduro7274
    @franklinoduro7274 2 ปีที่แล้ว

    the best explanation to this question so far!!! youtube has to put this video on top of the search list!!!

  • @lavanya_m01
    @lavanya_m01 3 ปีที่แล้ว +5

    Best explanation I've ever seen!!
    Commenting for algorithm boost, This channel deserves more subscribers :)

    • @franklinoduro7274
      @franklinoduro7274 2 ปีที่แล้ว

      No cap he has the best explanation... so far. its easy and simple

  • @ikennaokolo9219
    @ikennaokolo9219 7 หลายเดือนก่อน

    This is by far the best explanation I've seen for this question

  • @PankajC
    @PankajC 3 ปีที่แล้ว +1

    Thank you for making this video! The solution code and the algorithm are available in a lot of other places but how we **ARRIVE** at the solution/algorithm is best explained in this video. Thanks again! Please keep making more programming-related videos.

  • @franklinoduro7274
    @franklinoduro7274 2 ปีที่แล้ว

    I cant stop expressing my joy at this!!!!! best explained video

  • @abhijithvs7045
    @abhijithvs7045 3 ปีที่แล้ว +4

    Was really stuck with this and that was an awesome explanation. Thanks a lot.

  • @yunaf4609
    @yunaf4609 2 ปีที่แล้ว +1

    Thanks for this explanation man, Your channel is really high quality and honestly I'm surprised you don't have more subs.
    I didn't even understand the leetcode discuss section for this problem but was able to understand your explanation easily :)

  • @eshlovesyou6079
    @eshlovesyou6079 ปีที่แล้ว

    i was stuggling so much!! thanks a ton for this video you helped me out a lot!!

  • @Zombyyieeeeee
    @Zombyyieeeeee ปีที่แล้ว +1

    You explained it so well!! everything was on point
    Thank you so so much

  • @nands4410
    @nands4410 4 ปีที่แล้ว +4

    Thanks alot for this. I finally get the intuition

  • @kalyanadepu5666
    @kalyanadepu5666 ปีที่แล้ว

    Great explanation

  • @ritwik99
    @ritwik99 2 ปีที่แล้ว

    Thanks for making this tricky question easy for me!

  • @rayver01
    @rayver01 2 ปีที่แล้ว +2

    listing to him 1st time and i remembered chatur hehhe

  • @Bshashank1996
    @Bshashank1996 ปีที่แล้ว

    Excellent explanation.

  • @rajez.s7157
    @rajez.s7157 3 ปีที่แล้ว

    Really an awesome explanation. But one thing i noticed is, that the example we have: ""we are comparing each digit in the numbers."" So, in that case, we should not chosen 10 instead, it should be 1, 0 - Apart from this everything looks really great and intuition is really clear.

  • @jugalparulekar661
    @jugalparulekar661 3 ปีที่แล้ว

    Great explanation. Keep up the good work!

  • @satyadeepapatra414
    @satyadeepapatra414 2 ปีที่แล้ว

    you teach so well. thanks!

  • @adityapaithon6499
    @adityapaithon6499 4 ปีที่แล้ว +2

    when do you use .reverse() vs reversed()

    • @saianishmalla2646
      @saianishmalla2646  4 ปีที่แล้ว +2

      The reverse method actually reverses each and every element you give it and that happens in place, meaning:
      list = [1,2,3,4]
      list.reverse()
      // By calling .reverse we change the list itself now it has a value:
      list = [4,3,2,1]
      But, if we were to use reversed then in that case we actually get a separate object which we can iterate over.
      Reversed is actually not happening in place and takes up extra memory but it is faster than using reverse.
      Hopefully this helps!

    • @adityapaithon6499
      @adityapaithon6499 4 ปีที่แล้ว +2

      @@saianishmalla2646 reversed returns an iterator object
      So how would it take up extra memory?

    • @saianishmalla2646
      @saianishmalla2646  4 ปีที่แล้ว +1

      Actually yeah your right sorry for the confusion.

  • @sai99126
    @sai99126 3 ปีที่แล้ว

    bro once explain previous permutation of [8,2,7,3,5,6,9].

  • @yashhirulkar909
    @yashhirulkar909 4 ปีที่แล้ว

    nice explanation bro ..! but what will be the time and space complexity of it ..?

  • @tanishktripathi8773
    @tanishktripathi8773 4 ปีที่แล้ว

    What keyboard was that bruh?

    • @saianishmalla2646
      @saianishmalla2646  4 ปีที่แล้ว

      It this one: kono.store/products/whitefox-mechanical-keyboard
      I have red switches

  • @amitpoudel1212
    @amitpoudel1212 3 ปีที่แล้ว

    Bro timi nepali ho?