
In Amazon’s online assessment, there were two coding questions with a 70-minute time limit and a difficulty level between medium and hard. I hadn’t practiced enough questions before the test, so I didn’t pass all the test cases. Still, I wanted to share my experience.
I am really grateful for the tool Linkjob.ai, and that's also why I'm sharing my entire interview experience here. Although I didn’t pass in the end, I have to say that having an invisible AI assistant during the interview was incredibly convenient.
The core of the first question is to use a hash map to count the occurrences of each server ID, then process step by step:
Initialization Phase: Count the number of each server ID initially and calculate the total requests at the start (sum of each ID multiplied by its count).
Daily Replacement Phase: For each day’s replacement operation, first find the count of the ID to be replaced, then:
Subtract the contribution of the old ID (old ID × its count) from the total requests.
Add the contribution of the new ID (new ID × its count) to the total requests.
Finally, update the hash map: remove the old ID entry and add/update the new ID’s count.
This way, the total requests for each day can be computed efficiently step by step.

The second question can be solved using a monotonic stack to find, for each position, the nearest boundaries on the left and right where the difficulty is not less than the current value. Then, the valid subarray lengths can be computed using these boundaries.

Step-by-step approach:
Preprocess the left boundary array (left):
Traverse from left to right, maintaining a monotonically decreasing stack of indices. For the current element, pop all indices from the stack whose difficulty is less than the current one. The remaining top of the stack is the nearest position on the left with difficulty not less than the current element (if the stack is empty, use -1).
Preprocess the right boundary array (right):
Traverse from right to left with the same logic, obtaining the nearest position on the right with difficulty not less than the current element (if the stack is empty, use the array length n).
Calculate the maximum valid subarray length:
For each position i, the length of the valid subarray is right[i] - left[i] - 1. Traverse all positions and take the maximum value.
This method reduces the time complexity to O(n) using a monotonic stack, allowing the problem to be solved efficiently.

When I sat down for the amazon hackerrank assessment this year, I noticed the format had changed a lot. The test did not follow the same order for everyone. Some people started with coding, while others began with a work simulation or a survey. I found this random order a bit unsettling because I could not predict what would come next. The platform also introduced new problem types.
Here’s a quick look at some of the changes:
Change Type | Description |
|---|---|
Plagiarism Filters | Stricter filters to catch cheating, especially with AI tools. |
Non-Fixed Test Order | Randomized section order for each candidate. |
Decision-Making Focus | More questions tied to Amazon’s Leadership Principles. |
However, Linkjob.ai has already solved the issue of AI being detected. Before my interview, I had a friend help me test it, and even when the screen was being shared, the interviewer could not see it.
Time pressure hit me hard. The coding section lasted 70 minutes, but each problem demanded deep thinking. I could take short breaks, but the timer kept running. I had to manage my time carefully, or I risked leaving questions unfinished.
Before the test, I thought I had a solid plan. I spent hours on LeetCode, joined a few mock interviews with friends. I also read about system design basics, even though I expected only coding questions. I wanted to cover all my bases.
My routine looked like this:
Practiced coding challenges every day
Reviewed system design concepts
Took part in mock interviews
Studied Amazon’s values and leadership principles
But in practice, this may still not be enough. If you want to pass Amazon’s OA, you might need to do more. You can create your own plan based on your situation, using my routine as a reference.
Looking back, I learned a lot from this experience. I need to practice more than just algorithms. I should spend time on decision-making and real-world scenarios. Understanding a company’s values can make a big difference.
Next time, I will add more variety to my study plan. I will practice under strict time limits and try different question types. The amazon hackerrank taught me that preparation needs to be flexible and wide-ranging.
When I was taking the Amazon HackerRank, I found that staying focused and organized made all the difference. Here’s how I handled it:
I always read the problem carefully before touching the code to make sure I understood exactly what was required.
I broke the problem into smaller steps and planned my approach before writing anything.
I tested my code with simple inputs first and then tried edge cases to catch mistakes early.
I kept an eye on the clock so I didn’t spend too long on one question and end up rushing the others.
Whenever a test case failed, I fixed it right away instead of rewriting everything, which saved a lot of time.
It’s worth noting that even if you can’t arrive at a complete solution, you should still try to get partial answers. Interviewers may consider this and let you move forward. However, if you give up entirely, you lose all chances.
I tried several online platforms to get ready. Some stood out more than others:
HackerRank: Great for practicing coding challenges and simulating real assessments.
LeetCode: Offers a wide range of problems and helps build problem-solving skills.
Linkjob.ai: Mock interviews based on individual circumstances also include personalized follow-up questions to simulate a real interview scenario.
I also explored challenges in SQL, databases, and system design. Mixing up topics kept things interesting and prepared me for anything the test could throw at me.
Yes. In addition to the two coding problems, the Amazon OA also includes three other sections: a working simulation, a work style assessment, and a personality test.
I got the rejection email from HR about two days after the test. But I’ve also seen some people say they received the VO survey, which schedules the virtual interview, about a week later. So I think it’s worth waiting a bit longer.
It’s possible. A friend who prepared for the interview with me said that he passed all the test cases for the first question, but only four test cases for the second question. However, HR still allowed him to move on. They said they would help find the appropriate team and process the interview. He was interviewing for a base in California, where there are fewer positions, so it’s unclear whether he would pass the interview later.