amazon logo
Amazon· sde-ii

Amazon SDE-II | Phone screen round experience.

Result
Ongoing
Posted
18 Jun 2025
347 reads

Summary

I recently had a phone screen round for an SDE-II role at Amazon, which primarily focused on Data Structures and Algorithms. I tackled two sliding window problems, demonstrating various approaches and discussing their complexities. I felt positive about my performance and am expecting an Inclined verdict.

How it went

I began the interview with my introduction. The interviewer then presented a DSA problem: "Calculate sum of each subarray of size K for an array." I first outlined a brute-force solution and then proceeded to optimize it using the Sliding Window technique, clearly explaining the time and space complexity. I also re-iterated and dry-ran various edge cases to ensure the solution's robustness. I was not required to compile the code.

The follow-up question was to "Return max of each window instead of the sum." For this, I offered three distinct approaches:

  1. For distinct elements, I suggested using a sliding window combined with a set to track window elements and a maxHeap to find the maximum. I explained how to handle heapPop() if the max element is no longer in the window.
  2. For non-distinct elements, I proposed using a map instead of a set to maintain counts, ensuring heapPop() is done only when the count of the max element is zero.
  3. As a more advanced option, I mentioned using a segment tree to efficiently store the array and query the maximum of each segment.
I thoroughly explained the time and space complexity for each of these cases.

Towards the end, I asked the interviewer a query regarding the typical range of work and responsibilities for this role. My expected verdict for this round is Inclined.

Questions asked (2)

  1. 01

    Sum of Subarrays of Size K

    Data Structures & Algorithms · Medium

    Given an array and an integer K, calculate the sum of each subarray of size K.

  2. 02

    Maximum of Each Sliding Window

    Data Structures & Algorithms · Hard

    Given an array and a window size K, return the maximum element of each sliding window.

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Amazon recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

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