🇺🇸 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.
第一题:服务器所需的安全等级
Question:给定一个整数数组 security 表示系统中每台服务器所需的安全等级,需要将所有服务器划分成若干个 安全组。每个安全组内的服务器必须具有相同的安全等级,并且任意两个安全组的服务器数量差 ≤ 1。求满足条件的 最少安全组数量。
Problem-solving ideas:统计每个安全等级出现的频次,从最小频次向下枚举基准大小 S,检查是否所有频次 c 都满足:c // S ≥ c % S,这个条件确保每个频次都能拆分为若干个 S 和 S+1,找到较大的合法 S 后,所有等级频次除以 S+1 的向上取整之和。
第二题:包裹运输
Question:有 t 个运输场景,每个场景:n 辆卡车,初始容量为 truckCapacities。m 个包裹,重量为 packageWeights。 卡车规则:只能运送重量 ≤ 当前容量的包裹,运送后,卡车容量减半(向下取整)。判断每个场景是否所有包裹都能被运送。输出:每个场景返回 1(可能)或 0(不可能)。
Problem-solving ideas:对每个包裹(从最轻的开始):找出当前容量 ≥ 包裹重量的所有卡车。如果找不到,返回失败。如果找到多个,选择容量最小的那个(节省大卡车给后续重包裹)。该卡车配送后,容量减半,重新加入可用卡车。
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:
- Bug-free: Write the Heap operation at once and handle the Edge Cases (for example, max becomes min after being reduced)?
- Reading Comprehension: Do you need to understand the tongue twister in question 2 within 5 minutes?
- 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