Recent Amazon In 2026, Intern began to release OA again. The pace of this wave has obviously accelerated. It can basically be said to be "come as you go". I have done many games in a row during this period, and the overall experience is still the same: the questions change, but the routines remain the same.
If you have gone through the linen question bank before, this round will be very smooth to get started; if it is your first time, you may be a little confused, but in fact, if you grasp the core idea, you can still AC within ten minutes.
This article will briefly review an OA I encountered recently to give you a reference.

Code Question 1 (Amazon Cloud System Capacity Optimization Question)
Amazon developers are optimizing the capacity of their cloud systems. There are in the system N Server, no. I The memory capacity of each server is determined by the array Memory[i] Express. The system always contains an even number of servers: if any 2x Servers, then among them X Taiwan is the main server (primary), and the other X Taiwan is the backup server (backup).
For each master server P, there is a backup server B,satisfy Memory[B] ≥ memory[P]. The total memory capacity of the system is the sum of the memory capacity of all master servers.
Given N Servers and arrays Memory, please use this N The maximum system memory capacity that can be formed by one server.
Example description
Enter:Memory = [2, 4, 3, 1, 2](Note: The example in the question says 5 units, but it should actually be an even number. This is logically corrected to allow pairing)
- Goal: Select
XEach of the main servers can find the corresponding backup server (the memory of the backup server ≥ the main server), and the total memory of the main server is the largest. - Optimal solution: take the smaller one after sorting
XAs the main server, the larger oneXEach is used as a backup server, which ensures that each main server has a corresponding backup, and at the same time, the sum of the main servers is the largest.
Problem-solving ideas
To maximize the capacity of the main server, the server with the largest memory should be selected first and paired in pairs. Sort the memory array in descending order, and every two adjacent elements form a pair, the larger one is used as the backup, and the smaller one is used as the main server. That is, for the array sorted in descending order, just accumulate every other item starting from the second item.
Code Question 2 (SKU co-occurrence frequency calculation)
Amazon’s retail analytics team wanted to identify pairs of items that were most commonly purchased together To create “frequently purchased together” bundles.
During the observation period, each customer order is recorded as a space-separated list of SKU strings (e.g. "B07 B08 B09").
The same SKU may appear repeatedly in the same order, but duplicates are only counted once when counting bundles.
Your task: Find two different SKUs that appear together in the most orders. If there are multiple product pairs that are ranked first, return the pair with the smallest lexicographic order (compare the first SKU first, then compare the second SKU).
Example description
Enter:
Plaintext
Orders = ["B07 B08 B09", "B07 B08", "B08 B09"]
- SKU collection for order 1:
{B07, B08, B09}→ Generate product pairs:(B07,B08),(B07,B09),(B08,B09) - SKU collection for order 2:
{B07, B08}→ Generate product pairs:(B07,B08) - SKU collection for order 3:
{B08, B09}→ Generate product pairs:(B08,B09)
Global statistics:
(B07,B08): appears 2 times(B07,B09): appears 1 time(B08,B09): appears 2 times
When tied for first place, lexicographic comparison:(B07,B08) < (B08,B09), so return ["B07", "B08"].
Problem-solving ideas
Deduplication: For each order, first convert the SKU into a collection and remove duplicates.
Generate ordered commodity pairs: All pairwise combinations of SKUs in the collection are sorted in lexicographic order and used as keys (guaranteed (A,B) And (B,A) Is the same key).
Statistics frequency: Use a hash table to count the number of orders for each product pair.
Find results: Traverse the hash table and find the product pair that appears the most; if there are multiple pairs, select the one with the smallest lexicographic order.
A little extra about Amazon 2026 Intern OA preparations
If you are already preparing for OA from Amazon or similar companies, you can actually simulate the real exam environment in advance:
- Time-limited questions
- Strengthen debugging capabilities
- Increase the success rate of an AC
If you don’t want to bet on key OA status, you can also look at some more stable ways to ensure performance, such as conducting targeted simulations in advance or obtaining real-time OA assistance . The key is not "can you know it", but "can you write it right the first time".