I was recently interviewed by Amazon—specifically, for SDE-1 on October 31, 2025. I've attached the questions below .
- Given an array of integers, temperatures, that represents daily temperatures, return an array, output, where each element, output[i], indicates the number of days you need to wait after the day to experience a warmer temperature if there is no future day with a higher temperature, set output[i] to 0.
input temp : 30 60 90
output : 1 1 0 - Given a car with an unlimited gas tank and two arrays,
gasandcost, wherecost[i]is the gas needed to go from station i to i+1, find the starting index ingasfrom which you can complete a full loop, collectinggas[i]and spendingcost[i]at each station. Start with an empty tank. Return -1 if it's not possible; otherwise, return the unique index.
Example:
• gas: 1 2 3 4 5
• cost: 3 4 5 1 2
• Output: Index 3
- Some Leadership questions
Comments (4)


