Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Day 192 #397

Closed
vaskoz opened this issue Mar 2, 2019 · 0 comments
Closed

Day 192 #397

vaskoz opened this issue Mar 2, 2019 · 0 comments
Assignees

Comments

@vaskoz
Copy link
Owner

vaskoz commented Mar 2, 2019

Good morning! Here's your coding interview problem for today.

This problem was asked by Google.

You are given an array of nonnegative integers. Let's say you start at the beginning of the array and are trying to advance to the end. You can advance at most, the number of steps that you're currently on. Determine whether you can get to the end of the array.

For example, given the array [1, 3, 1, 2, 0, 1], we can go from indices 0 -> 1 -> 3 -> 5, so return true.

Given the array [1, 2, 1, 0, 0], we can't reach the end, so return false.

@vaskoz vaskoz self-assigned this Mar 2, 2019
@vaskoz vaskoz mentioned this issue Mar 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant