Amazon SDE Intern Interview Experience | 2027 Batch

Anonymous1 week ago

Hi everyone!

I recently appeared for the Amazon SDE I Intern interview process for the 2027 batch. The process started with an online assessment, followed by a technical interview.

I wanted to share my experience and the coding questions I faced to help other students preparing for similar opportunities.

Interview Details

  • Company: Amazon

  • Role: SDE I Intern

  • Batch: 2027

  • Interview Duration: 60 minutes

  • Interview Mode: Virtual

  • Coding Platform: Amazon LiveCode

  • Result: Awaited

Online Assessment

The Amazon online assessment followed a new pattern and consisted of three parts: Coding Challenge, Work Simulation, and Work Style Survey.

1. Coding Challenge

This section focused on problem-solving and coding skills. It was important to understand the problem statements carefully, choose the right approach, and write efficient solutions within the given time.

2. Work Simulation

This section presented work-related situations to assess how candidates approach different challenges and make decisions in a professional environment.

3. Work Style Survey

This section focused on work preferences and professional behaviour. The questions helped assess how candidates approach teamwork, responsibilities, and decision-making.

Overall, the assessment was different from a traditional coding-only test because it included both technical problem-solving and work-related assessments. I would recommend preparing for DSA questions while also taking time to understand the work simulation and work style sections.

My advice is to read each question carefully, manage your time well, and answer the work-related questions thoughtfully and consistently.


Technical Interview

The technical interview lasted around 60 minutes and focused mainly on Data Structures and Algorithms (DSA). I was asked two coding questions involving grid traversal and binary trees.

Question 1: Minimum Number of Delivery Partners

Topic: Grid, DFS, Connected Components

We are given an m × n grid representing a delivery area. Each cell contains either '1' or '0'.

  • '1' represents a house.

  • '0' represents an empty location.

  • Houses connected horizontally or vertically belong to the same group.

  • Each connected group requires one delivery partner.

The task is to find the minimum number of delivery partners required to cover all houses.

Example:

Input:
grid = [
    ['1', '1', '0', '0'],
    ['1', '0', '0', '1'],
    ['0', '0', '1', '1'],
    ['1', '0', '0', '0']
]

Output:
3

Explanation:

There are three separate groups of connected houses:

  1. The houses in the top-left corner.

  2. The connected houses on the right side.

  3. The single house in the bottom-left corner.

Therefore, the minimum number of delivery partners required is 3.

Approach:

I used Depth-First Search (DFS) to solve this problem. I traversed every cell in the grid. Whenever I found a house that had not been visited, I increased the count by one and started DFS to visit all houses connected to it.

This ensured that each connected group was counted only once.

Code (C++):

#include <bits/stdc++.h>
using namespace std;

class Solution {
public:
    void dfs(vector<vector<char>>& grid,
             int r, int c,
             int m, int n) {
        
        if (r < 0 || c < 0 || r >= m || c >= n ||
            grid[r][c] != '1') {
            return;
        }

        // Mark the house as visited
        grid[r][c] = '0';

        dfs(grid, r + 1, c, m, n);
        dfs(grid, r - 1, c, m, n);
        dfs(grid, r, c + 1, m, n);
        dfs(grid, r, c - 1, m, n);
    }

    int numDeliveryPartners(vector<vector<char>>& grid) {
        int m = grid.size();

        if (m == 0) return 0;

        int n = grid[0].size();
        int count = 0;

        for (int i = 0; i < m; i++) {
            for (int j = 0; j < n; j++) {
                if (grid[i][j] == '1') {
                    count++;

                    // Visit all houses in this group
                    dfs(grid, i, j, m, n);
                }
            }
        }

        return count;
    }
};

int main() {
    vector<vector<char>> grid = {
        {'1', '1', '0', '0'},
        {'1', '0', '0', '1'},
        {'0', '0', '1', '1'},
        {'1', '0', '0', '0'}
    };

    Solution sol;
    cout << sol.numDeliveryPartners(grid) << endl;

    return 0;
}

Complexity Analysis:

  • Time Complexity: O(m × n), because each cell is visited at most once.

  • Auxiliary Space: O(m × n) in the worst case due to the recursive DFS call stack.

This question tested my understanding of grid traversal, DFS, connected components, and time and space complexity.

Question 2: Binary Tree Spiral Order Traversal

Topic: Binary Trees, Stacks, Tree Traversal

Given the root of a binary tree, print its nodes in spiral order, also known as zigzag level order traversal.

In this traversal, the nodes at each level are visited in alternating directions. One level is traversed from left to right, and the next level from right to left.

Example:

        1
       / \
      2   3
     / \ / \
    4  5 6  7

Output:

1 3 2 4 5 6 7

Explanation:

  • Level 1: 1

  • Level 2: 3 2

  • Level 3: 4 5 6 7

Combining these levels gives the required spiral order.

Approach:

I used two stacks to solve the problem. One stack processes the current level, while the other stores the nodes for the next level.

The order in which the left and right children are pushed determines the direction of traversal at each level. By switching between the two stacks, we can print the nodes in spiral order without using recursion.

Code (C++):


#include <bits/stdc++.h>
using namespace std;

struct Node {
    int data;
    Node* left;
    Node* right;

    Node(int val) {
        data = val;
        left = right = nullptr;
    }
};

class Solution {
public:
    vector<int> findSpiral(Node* root) {
        vector<int> result;

        if (root == nullptr) {
            return result;
        }

        stack<Node*> currentLevel;
        stack<Node*> nextLevel;

        currentLevel.push(root);

        // First level: left to right (only root)
        // Second level: right to left
        bool leftToRight = false;

        while (!currentLevel.empty()) {
            Node* node = currentLevel.top();
            currentLevel.pop();

            result.push_back(node->data);

            if (leftToRight) {
                // Push right first, then left
                if (node->right) {
                    nextLevel.push(node->right);
                }
                if (node->left) {
                    nextLevel.push(node->left);
                }
            } else {
                // Push left first, then right
                if (node->left) {
                    nextLevel.push(node->left);
                }
                if (node->right) {
                    nextLevel.push(node->right);
                }
            }

            if (currentLevel.empty()) {
                swap(currentLevel, nextLevel);
                leftToRight = !leftToRight;
            }
        }

        return result;
    }
};

int main() {
    Node* root = new Node(1);
    root->left = new Node(2);
    root->right = new Node(3);
    root->left->left = new Node(4);
    root->left->right = new Node(5);
    root->right->left = new Node(6);
    root->right->right = new Node(7);

    Solution sol;
    vector<int> result = sol.findSpiral(root);

    for (int x : result) {
        cout << x << " ";
    }

    cout << endl;

    return 0;
}

Complexity Analysis:

  • Time Complexity: O(n), because every node is processed once.

  • Auxiliary Space: O(n) in the worst case for the stacks.

This question tested binary tree traversal, stack operations, and the ability to manage traversal order correctly.

Preparation Tips

Based on my experience, I would recommend focusing on the following topics:

  • Arrays, strings, and hashing.

  • Common DSA patterns and problem-solving techniques.

  • Binary trees and different tree traversals.

  • Graphs, grids, DFS, and BFS.

  • Greedy algorithms and dynamic programming.

  • Time and space complexity analysis.

Interview Result: Awaited.

I hope this experience helps other students preparing for Amazon SDE internship opportunities. All the best to everyone preparing!

Recommended Reads

Post

DSA daily challenge

i did another problem today is was easy (1)I tried using loop , (2)Using binary search , (3 )Using determinent formula , (4) later divisor method so finaly all

Post

am starting dsa and doing pattern printing questions can you guys please tell me where to practice or just do strivers sheet questions ??? am doing it

please reply

Interview Experience

MobiKwik SDE-3 Interview Experience | Java Developer |

MobiKwik SDE-3 interview process was a mix of problem-solving, system design, and practical coding. Here’s a breakdown of the rounds and what I learned from the

Success Stories

I Wasn’t From CS, But I Chose to Prepare Like One

I’m Mahima, a B.Tech ECE student who wanted to build a career in software development. My placement journey was a mix of learning, self doubt, consistency, and

Post

AI Is Finding Security Bugs Faster

Imagine a bug hiding inside a programming language used by millions of websites. Developers have been working with it for years, but the problem goes unnoticed.

Comments0