I recently reviewed some of the most common Amazon SDE Online Assessment (OA) question patterns. Although Amazon OA questions change frequently, many core patterns appear repeatedly. Most questions focus on areas such as Arrays, Strings, HashMaps, Sorting, Simulation, and Greedy algorithms.
Amazon SDE OA Coding Questions Breakdown
Coding Question 1: Transaction Logs
Problem Overview:
Given a list of user transaction records. Each transaction contains:
sender receiver amount
You need to count how many transactions each user is involved in. Both sending and receiving transactions should be counted. Return all user IDs whose transaction count is greater than or equal to the given threshold.
Example:
Input: logs = [ "1 2 50", "2 3 100", "1 3 20" ] threshold = 2 Output: [1,2,3]
What it tests:
- HashMap
- String Parsing
- Sorting
Key points:
A user appearing as both sender and receiver needs to be counted correctly. Careful parsing and handling duplicate transactions are important.
Coding Question 2: Server Updates
Problem Overview:
You are given a group of servers with different states. During each update round, the state of neighboring servers affects the next state.
Return the final server state after performing k update operations.
What it tests:
- Array Simulation
- Dynamic Programming
- Edge Case Handling
This type of simulation problem appears frequently in Amazon OA. The main challenge is implementing state transitions correctly and handling boundary conditions.
Coding Question 3: Password Strength
Problem Overview:
Given a password, determine how many additional characters are needed to make it valid.
Typical requirements include:
- Minimum length requirement
- Contains numbers
- Contains uppercase letters
- Contains lowercase letters
- Contains special characters
What it tests:
- String Processing
- Character Counting
- Condition Handling
This problem focuses on careful implementation rather than advanced algorithms. Missing one condition is a common mistake.
Coding Question 4: Fresh Promotion
Problem Overview:
Given a shopping cart item list and promotion rules, determine whether the customer qualifies for a promotion.
Example:
Shopping Cart: [apple, apple, orange] Promotion Rule: apple apple orange anything
Return true or false depending on whether the promotion pattern matches.
What it tests:
- Sliding Window
- Two Pointer
- Pattern Matching
The main challenge is handling wildcard items and matching the promotion sequence correctly.
Coding Question 5: Nearest Delivery Route
Problem Overview:
Given delivery locations represented as coordinates:
[x, y]
Find the k closest locations to the warehouse.
What it tests:
- Sorting
- Heap
- Priority Queue
This is a common optimization-style problem where candidates need to decide between sorting all locations or using a heap for better efficiency.
Amazon SDE OA Preparation Focus
For Amazon OA preparation, it is usually better to focus on high-frequency patterns instead of randomly solving a large number of problems.
- HashMap + Array
- Sliding Window
- Heap / Priority Queue
- Greedy Algorithms
- Simulation
- BFS / DFS
Amazon OA also includes the Leadership Principles Assessment. Many candidates focus only on coding but underestimate the behavioral assessment, which can also affect the final result.
How to Prepare for Amazon SDE OA
A strong Amazon OA preparation strategy is to understand recurring patterns, improve coding speed, and practice solving problems under time constraints. Instead of only increasing the number of problems completed, learning how to quickly identify the correct algorithm pattern is usually more effective.
Interview Aid - Technical Interview Preparation Support
Interview Aid focuses on North America technical interview preparation, providing support for OA, coding interviews, and virtual onsite interview preparation. We help candidates prepare more efficiently through algorithm analysis, coding strategy review, and interview communication improvement.
If you are preparing for Amazon SDE OA, coding interviews, or final round interviews, building a focused preparation plan early can improve your overall interview performance.
Top comments (0)