SDE 1 Amazon Round 1
Company: Amazon
Role: sde i
Interview Stage: Phone Screen
Location: unknown
Year: unknown
Original Post Content:
Hi everyone,
I attended the first round of Amazon interview for SDE 1 and was asked the below questions:
1. You are initially positioned at the first index of the array arr.
In one step you can jump from index i to index i + 1, i - 1 or j where arr[i] == arr[j].
Return the minimum number of steps required to reach the last index of the array.
Example: 1, 2, 3, 4, 5, 2, 7 -> 3
2. You have to build a wall of dimension 3 * N for your house only with the help of stones of dimension 1 * 3.
Find the number of ways in which the wall can be constructed.
I was able to solve the first question after spending so much time and after taking hints from the recruiter.
There was no time for the second question to solve, since I spent most of my time on the first question.