Can You Reach the End — Solution & Editorial
Sweep once maintaining the furthest reachable index; if the current index ever exceeds it, you are stuck.
Complexity: O(N)
Sweep once maintaining the furthest reachable index; if the current index ever exceeds it, you are stuck.
Complexity: O(N)