LeetCode 31 | Next Permutation | Solution Explained (Java + Whiteboard)

preview_player
Показать описание
Running Time: O(n)
Space Complexity: O(1)

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

I was actually looking for more of an explanation of what the next permutation in lexical descending order is. I think I get what it is now. Thanks!! If I understand right, it's just one step closer to descending order. Swapping the first two integers out of descending order.

PatteeGreen
Автор

thank you so much for explaining so easily..i understood the approach.

saketbarnawal
welcome to shbcf.ru