Print the maximum in the given range and jump || Adobe

adobe logo
adobe
June 16, 20252 reads

Summary

I encountered a Data Structures & Algorithms problem during an interview at Adobe, which involved finding the maximum jumps to reach the end of an array.

Full Experience

You have been given an array and you are at index 0.

print the maximum jumps too reach the end

Ex: - [2, 3, 1, 1, 4] -> 2->3->4
Ex: - [5, 1, 1, 4, 2, 2, 1]-> 5->4->1

TC: - O(N)
sc: - O(N) for vector

Interview Questions (1)

Q1
Maximum Jumps to Reach End of Array
Data Structures & AlgorithmsMedium

You have been given an array and you are at index 0.

print the maximum jumps too reach the end

Ex: - [2, 3, 1, 1, 4] -> 2->3->4
Ex: - [5, 1, 1, 4, 2, 2, 1]-> 5->4->1

TC: - O(N)
sc: - O(N) for vector

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!