Amazon SDE-1 OA - July 2025

amazon logo
amazon
SDE-1
July 24, 202512 reads

Summary

I underwent the Amazon SDE-1 Online Assessment in July 2025. The assessment comprised a coding challenge with two specific problems, a work simulation, and two style assessments covering engineering and Amazon Leadership Principles.

Full Experience

Applied on 10th July 2025 on Amazon Jobs
Got Assessment link on 17th July (to be completed within 1 week)
Gave the Assessment on 22nd July, It was divided into 4 parts:

1 - Coding Challenge
    
First Question
    
    Formally, given a string itemCategories, find the number of ways to partition the string into exactly two contiguous non-empty substrings such that the number of distinct characters occurring in both the substrings is greater than a given integer k.

    Example
    Consider itemCategories = "abbcac" and k = 1. We can partition the list of categories into exactly two sub-lists(substrings) in the following ways:

    Prefix    Suffix    No of shared categories    List of shared categories
a    bbcac    1    a
ab    bcac    2    a, b
abb    cac        1    a
abbc ac        2    a, c
abbcac c    1    c

    There are two ways to partition the list of categories such that the number of distinct characters shared by both the sub-lists is greater than 1 so return 2.

Second Question

     For an array of integers, arr, and some chosen integer k, you can swap the i-th element with the j-th element only if (arr[i] & arr[j]) <= k, where '&' represents the bitwise AND operation.

    Given an array arr of n integers which is a permutation of integers from 0 to n−1, i.e., contains all integers from 0 to n−1, it can be shown that it is always possible to sort the array. Find the value of the maximum non-negative integer k for which the array can be sorted using this algorithm. It can be shown that it is always possible to sort the array. Report the maximum such k. Note that the array is already sorted.

    Example

    Suppose n = 4 and arr =

    | 0 | 3 | 2 | 1 | → | 0 | 1 | 2 | 3 |
    |---|---|---|---| |---|---|---|---|

    3 & 1 = 1

    The maximum possible value of k for which the array can be sorted is 1. Note that the array can also be sorted for k = 0.

    


2 - Work Simulation Assessment

It had 3-4 different scenarios for which I was to select the best possible responses for incoming emails and messages..for eg: You are in a backend role, added to this new team, etc..

All questions based on SDE role only.

3 - Engineering Style Assessment

It had MCQs regarding your behaviour and attitude.

4 - Work Style Assessment

It had MCQs linking to Amazon Leadership Principles.

Interview Questions (2)

Q1
Partition String into Two Substrings with Shared Distinct Characters
Data Structures & Algorithms

Formally, given a string itemCategories, find the number of ways to partition the string into exactly two contiguous non-empty substrings such that the number of distinct characters occurring in both the substrings is greater than a given integer k.

Example
Consider itemCategories = "abbcac" and k = 1. We can partition the list of categories into exactly two sub-lists(substrings) in the following ways:

Prefix    Suffix    No of shared categories    List of shared categories
a    bbcac    1    a
ab    bcac    2    a, b
abb    cac        1    a
abbc ac        2    a, c
abbcac c    1    c

There are two ways to partition the list of categories such that the number of distinct characters shared by both the sub-lists is greater than 1 so return 2.

Q2
Maximum K for Bitwise AND Swap Sort
Data Structures & Algorithms

For an array of integers, arr, and some chosen integer k, you can swap the i-th element with the j-th element only if (arr[i] & arr[j]) <= k, where '&' represents the bitwise AND operation.

Given an array arr of n integers which is a permutation of integers from 0 to n−1, i.e., contains all integers from 0 to n−1, it can be shown that it is always possible to sort the array. Find the value of the maximum non-negative integer k for which the array can be sorted using this algorithm. It can be shown that it is always possible to sort the array. Report the maximum such k. Note that the array is already sorted.

Example

Suppose n = 4 and arr =

| 0 | 3 | 2 | 1 | → | 0 | 1 | 2 | 3 |
|---|---|---|---| |---|---|---|---|

3 & 1 = 1

The maximum possible value of k for which the array can be sorted is 1. Note that the array can also be sorted for k = 0.

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

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