Amazon (AWS) | SDE-2 | Phone Screen

Anonymous User
814
Feb 20, 2025
Feb 20, 2025

YOE: 5+ years
Position: SDE 2
Location: Ireland

OA:

  1. Given the number of movie series watched, find the minimum subarray that includes series1 and series2.
    The minimum subarray is counted based on the number of distinct elements in it.
    Example:
    s1 = 1
    s2 = 2
    watched = [1, 3, 2, 1, 4]
    Output: [2, 1]
  2. Given an array, find the maximum possible number after performing a specific operation:
    Remove the smallest element from the array.
    Replace it with the sum of its adjacent elements (idx-1 + idx+1).
    Example:
    charge = [-2, 4, 3, -2, 1]
    Step 1: Remove idx 0 (-2) → [4, 3, -2, 1]
    Step 2: Remove idx 2 (-2) → [4, 4]
    Step 3: Remove idx 1 (4) → [4]

Phone Screen:

  1. Leadership Principles: Customer Satisfaction & Dealing with Setbacks (30 min)
    Design a Task Scheduler to append tasks and fetch them based on priority (30 min)
    Example:
class Task:
    def __init__(self, id, priority, code):
        self.id = id
        self.priority = priority
        self.code = code
class TaskScheduler:
    def add(task):  # Add a task
    def fetch():  
 # Fetch task with the highest priority

My Take:

  • I prepared well and performed well too. For the Leadership Principles (LP) round, I structured my responses using the STAR method and covered key principles like Customer Obsession, Deep Dive, Being Right a Lot, and Delivering Results.
  • For the OA, I solved the first problem using the minimum sliding window approach. The second problem, I tackled using an indexed heap, but I hit a time limit—15/20 test cases passed.
  • For the phone screen, I solved the problem in 10 minutes, starting with a brute-force approach (O(n² log n)) and optimizing it to O(n log n) worst case. I covered edge cases, discussed bottlenecks, and included type annotations in my code.(May be could have used BST )
  • Weirdly, the interviewer mentioned the recruiter’s name and said they would update me on the next steps. But today, I received a rejection email. Honestly, I feel like giving up on FAANG, but it still feels like the only way out of my current situation.
Comments (2)