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

You are given an array of N integers. Return maximum value for all 1 … #30

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

aditiagarwal34550
Copy link
Member

…≤ i, j ≤ N, which is defined as |array[i] - array[j]| + |i - j|, where |x| denotes absolute value of x.

…≤ i, j ≤ N, which is defined as |array[i] - array[j]| + |i - j|, where |x| denotes absolute value of x.
You are in an infinite 2D grid where you can move in any of the 8 directions :
 (x,y), (x+1, y), (x - 1, y),  (x, y+1), (x, y-1), (x-1, y-1), (x+1,y+1), (x-1,y+1), (x+1,y-1) 
You are given a sequence of points and the order in which you need to cover the points. Give the minimum number of steps in which you can achieve it. You start from the first point.
You are in an infinite 2D grid where you can move in any of the 8 directions :
 (x, y), (x +1, y), (x - 1, y),  (x, y + 1),  (x, y - 1),  (x - 1, y - 1),  (x + 1, y + 1),  (x - 1,y + 1), (x + 1, y - 1) 
You are given a sequence of points and the order in which you need to cover the points. Give the minimum number of steps in which you can achieve it. You start from the first point.
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

Successfully merging this pull request may close these issues.

1 participant