[Java] Leetcode 31. Next Permutation [Array #11]

preview_player
Показать описание
In this video, I'm going to show you how to solve Leetcode 31. Next Permutation which is related to Array.

Here’s a quick rundown of what you’re about to learn:

⭐️ Course Contents ⭐️
⌨️ (0:00) Question
⌨️ (2:29) Solution Explain
⌨️ (8:20) Code

In the end, you’ll have a really good understanding on how to solve Leetcode 31. Next Permutation and questions that are similar to this Array.

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

I didn't understand when to reverse and how we applied reverse, on what basis we do reverse, btw there are 2 reverse i understood second one but not 1st

Malayali_learner
Автор

line 16 ,while(cur < replaceIndex) instead of 0 < replaceIndex, cuz replaceIndex should be less than cur.(nums[prv] > nums[cur])

MeetManga
visit shbcf.ru