Amazon OA sharing|Two Coding + BQ assessments, the overall difficulty is medium to easy

1,953 Views

Just received it this afternoon Amazon OA, I finished it in the evening. The overall experience feels that the difficulty is medium to easy. The two questions are not particularly complex algorithm questions, but more focused on data structure + regular observation. If you are relatively stable in answering questions at ordinary times, you can basically complete it within the time.

This OA platform is still a common online evaluation environment. After the coding part is completed, there will be a period of situational judgment questions (similar to work scene selection) + personality test questions. The whole process takes about 100 minutes, and the pace is not particularly stressful.

Amazon OA sharing|Two Coding + BQ assessments, the overall difficulty is medium to easy

Coding 1: Bug Frequency sorting

Brief analysis of the topic

The first question is very classic overall. It is essentially a frequency sort type question. Give a topic bugs Array, each number represents a bug code, there may be duplicate numbers in the array, and they need to be sorted according to the "importance" of the bug.

Sorting rules are actually very intuitive. First, the bug with fewer occurrences is more important, that is, the higher the priority; if two bugs have the same number of occurrences, the bug code with the smaller value will be ranked first.

For example, an example array:

[8,4,6,5,4,8]

After counting the number of occurrences of each number, you will get:

6 -> 1
5 -> 1
8 -> 2
4 -> 2

According to the sorting rules of the questions, the final result will become:

[5,6,4,4,8,8]

Problem-solving ideas

The first step is to use HashMap to count the number of occurrences of each bug code, and then use custom sorting rules when sorting: first sort by frequency in ascending order, and if the frequencies are the same, then sort by the bug code itself in ascending order.

The code implementation is a frequency statistics + custom comparator sorting. This kind of question is relatively common in many OA. If you have studied similar question types, it is basically a type that can be completed quickly.

Coding 2: Prefix maximum number of segments

Brief analysis of the topic

The question is given a string containing only uppercase letters packages. For each prefix of a string, it is required to calculate the maximum number of consecutive substrings that this prefix can be cut into, and a condition needs to be met: the number of occurrences of each character in each paragraph must be exactly the same.

In other words, all separated substrings must have the same character frequency distribution.

Give a simple example:

String:

ABAB

Let’s look at prefix one by one:

A     -> 1
AB -> 1
ABA -> 1
ABAB -> 2

The last prefix ABAB Can be divided into:

AB | AB

So the answer for this one is 2.

So the final output is:

[1,1,1,2]

Problem-solving ideas

The key point of this question is: for each prefix, it is necessary to determine the maximum number of substrings with the same structure that it can be cut into.

The general idea is to first maintain the character frequency statistics of prefix. If the prefix length is N, assuming it can be divided into k Segments, then the length of each segment is n / k. Only if N Can be k This segmentation is only possible when dividing by integers.

Next, you need to check whether the character distribution of each segment is consistent, that is, whether the frequency of characters within each segment is the same. If the conditions are met, then this k It is a legal number of segments, and the largest one is finally taken. k That’s it.

During implementation, a 26-length frequency array is usually used to record character statistics, and then the number of possible segments is enumerated for verification. The whole question type is string processing + simple mathematical rule judgment.

OA other parts

After the two codings are written, there is also a part of Work Simulation and some personality test-type questions. This part is mainly for some work scenarios, such as team collaboration, task priority conflicts, project time pressure, etc., allowing you to choose the approach that best suits your behavior among several options. Some questions are single-choice, and some ask you to choose Most Likely/Least Likely among several options.

This part of Amazon's questions are basically designed around Leadership Principles, such as: Customer Obsession, Ownership, Bias for Action, Earn Trust, etc. So, when answering questions, the general idea is to take the initiative to take responsibility, prioritize solving customer problems, teamwork, and data-driven decision-making. The number of questions in this part is not particularly large, but the answers need to be logically consistent and not inconsistent.

Learn more

If you have been preparing for OA from companies such as Amazon / Google / Citadel / IMC recently, but are not familiar with the question types or are worried about lack of time, you can actually look at the real interview question bank in advance. We have been sorting out the latest OA question types from major manufacturers for a long time, and there are also Real-time OA Assistance and simulation training. Many students successfully passed OA by familiarizing themselves with the question types in advance.

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