This problem asks to compute the minimum number of steps to advance to the last location. Is a solution that’s O(n) time and O(n) space sufficient? I know O(1) space is possible, but I’m not sure it can be done without pushing the time up. Thanks!
This problem asks to compute the minimum number of steps to advance to the last location. Is a solution that’s O(n) time and O(n) space sufficient? I know O(1) space is possible, but I’m not sure it can be done without pushing the time up. Thanks!