Amazon SWE 2 Interview

Title: Amazon - Software Development Engineer II - Final Round
Description:

  • Education: Masters
  • Years of Experience (YOE): 7
  • Questions Asked:
    • Coding Round:
      • They gave me a question to Implement LRU cache, had to use a hashmap + doubly linked list. Talked about O(1) complexity for get and put.
      • Then a DP one:
        • Dynamic Programming Problem:
          • Problem: Given a n length array of positive integers nums, return the minimum cost to climb stairs to the top. You can climb 1 or 2 steps at a time. Cost to step on i is nums[i].
          • Example 1:
            • Input: nums = [10, 15, 20]
            • Output: 15
            • Explanation: Climb to index 1 (cost 15), then to the top (no cost at top).
          • Example 2:
            • Input: nums = [1, 100, 1, 1, 1, 100, 1, 1, 100, 1]
            • Output: 6
            • Explanation: There’s a pattern to jump and avoid costly steps.
          • Asked me to explain space optimization too after I wrote basic dp solution.
    • Leadership Principle Interview:
      • Questions mostly around Ownership and Dive Deep. Had to talk about times when I took initiative or debugged complex issues that weren’t even in my team’s code.