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

preview_player
Показать описание
This video is a solution to Leet code 31, Next Permutation. I explain the question and the best way to solve it and then solve it using Python.

Comment below if you have a better solution to this problem!

Let me know if you have any feedback and don't forget to subscribe for more videos!

More leetcode questions solved:

Gear used:
Рекомендации по теме
Комментарии
Автор

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

paritoshkumar
Автор

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

franklinoduro
Автор

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

perelium-x
Автор

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

lavanya_m
Автор

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.

PankajC
Автор

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

ikennaokolo
Автор

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

abhijithvs
Автор

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 :)

yunaf
Автор

I cant stop expressing my joy at best explained video

franklinoduro
Автор

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

Zombyyieeeeee
Автор

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

eshlovesyou
Автор

Thanks alot for this. I finally get the intuition

nands
Автор

Thanks for making this tricky question easy for me!

ritwik
Автор

listing to him 1st time and i remembered chatur hehhe

rayver
Автор

Great explanation. Keep up the good work!

jugalparulekar
Автор

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.

rajez.s
Автор

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

adityapaithon
Автор

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

sai
Автор

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

yashhirulkar