12.17 Amazon OA interview experience sharing | HackerRank double questions, both logic + data structure

1,605 Views

🇺🇸 Amazon Recently they’ve started issuing OAs in batches again. I received my Amazon OA on December 17, and the platform was HackerRank with 2 coding questions—no behavioral interview, it was just straight problem solving. My overall impression was that the problems themselves weren’t particularly obscure, but the prompts were long and logically winding. If you don’t read the problem carefully, it’s very easy to go down the wrong path from the start, and because time is limited, you absolutely must fully understand the rules before writing any code.

Below is a complete review of the two questions.

12.17 Amazon OA interview experience sharing | HackerRank double questions, both logic + data structure

Question 1: The security level required by the server

Topic:Given an array of integers security Indicates the security level required for each server in the system, and all servers need to be divided into several security groups. The servers in each security group must have the same security level, and the difference in the number of servers in any two security groups is ≤ 1. Find the minimum number of security groups that meet the conditions.

Problem-solving ideas:Count the frequency of occurrence of each security level, enumerate the base size S from the minimum frequency downward, and check whether all frequencies c satisfy: c // S ≥ c % S. This condition ensures that each frequency can be split into several S and S+1. After finding a larger legal S, all the level frequencies are divided by the sum of S+1 rounded up.

Question 2: Package transportation

Topic:There are t transportation scenarios, each scenario: n trucks, with initial capacities of truckCapacities. m packages with weight packageWeights. Truck rules: Only packages weighing ≤ current capacity can be shipped. After delivery, the truck capacity is halved (rounded down). Determine whether all packages can be shipped in each scenario. Output: Each scenario returns 1 (possible) or 0 (unlikely).

Problem-solving ideas:For each package (starting with the lightest): find all trucks whose current capacity ≥ package weight. If not found, return failure. If multiple are found, choose the one with the smallest capacity (save the big truck for subsequent heavy packages). After the truck is delivered, its capacity is reduced by half and rejoins available trucks.

Why do you need ProgramHelp’s OA real-time assistance?

After reading the above analysis, you may feel that you understand it. But under the high pressure of the actual OA countdown of 90 minutes, facing an IDE with HackerRank black background and white text, you can really guarantee:

  1. Bug-free: Write the Heap operation at once and handle the Edge Cases (for example, max becomes min after being reduced)?
  2. Reading Comprehension: Do you need to understand the tongue twister in question 2 within 5 minutes?
  3. Code duplication check: Will your code not be flagged for being exactly the same as the one on GitHub?

High-End Services We Provide:

  • Real-time screen share support: Our algorithm experts are connected to you in real time, we are watching while you are doing it. When encountering lag, direct voice/text prompts for ideas and codes.
  • Original code guarantee: Every line of code is handwritten by us on the secondary screen, conforming to your coding style, and is definitely not an online copy-paste.
  • All Cases Passed: Our goal is not just to be done, but to be completely green.

Recommended reading/exam preparation reference links:

👉 Amazon SDE OA full process review | High-frequency real questions + exam preparation suggestions explained in one go
📍 Comprehensive introduction to Amazon OA format, typical real questions and preparation strategies. It is a very good reference for you when writing Amazon interview.Amazon SDE OA full process review|High-frequency real questions + exam preparation suggestions explained clearly in one go

👉 Atlassian OA interview experience|ProgramHelp real experience of full voice assistance
📍A review of the actual use of ProgramHelp in Atlassian OA can be used as a reference case for "actual service effects".Atlassian OA interview experience|ProgramHelp real experience of full voice assistance

👉 Jump Trading SDE face-to-face experience sharing|ProgramHelp remote assistance to accompany you throughout the process
📍 A case study on how ProgramHelp assisted candidates in on-site and video/online interviews at fintech companies — with insights that are also useful for preparing quantitative or SDE interviews.Jump Trading SDE face-to-face experience sharing|ProgramHelp remote assistance to accompany you throughout the process

author avatar
Jory Wang Amazon Senior Software Development Engineer
Amazon senior engineer, focusing on the research and development of infrastructure core systems, with rich practical experience in system scalability, reliability and cost optimization. Currently focusing on FAANG SDE interview coaching, helping 30+ candidates successfully obtain L5/L6 Offers within one year.
END
 0