Leetcode 55.Jump Game (Java)

preview_player
Показать описание
6:04
My mistake - I said it wrong but I wrote correctly.
The order actually matters - Fail checking should come first.
In our example 1 3 2 1 0 1 2 1, in the iteration after the number 0, we meet the condition to update the ‘furthest’ pointer (which shouldn't), and it will not go into fail checking if statement, giving us the wrong answer.

Not a tutorial. Just documentation of my personal study.
If you wanna watch this, set the play speed to 1.5x.
Рекомендации по теме
join shbcf.ru