LeetCode Top 150 Interview Questions-Medium Level-#45Jump Games II-O(n) O(1) solution
Intuition
Every time, when meeting the farthest position, we will need another jump.
Specifically, check if you can reach then jump number += 1,If reach the end, jump number += 1, end=farthestEdge case is if only has <=1 elements need to jump 0 times...
huanganni.hashnode.dev2 min read