Google OA interview | Two questions in 10 minutes AC, a written test with a high hit rate on the original questions

61 Views
No Comment

Just ended recently Google OA is fast-paced but not too difficult. In fact, Google does not like to ask particularly biased questions in the written test. Instead, it prefers deformed versions of classic model questions. If the question system is relatively complete, it is easy to have a "déjà vu" feeling. There were two questions in this OA, and I answered them all in about 10 minutes. The questions themselves are not tricky. What really makes the difference is whether you can quickly identify the question type and then use the most stable ideas to write a code that passes the first time. Let me review the process for you below.

Google OA interview | Two questions in 10 minutes AC, a written test with a high hit rate on the original questions

Timeline reference

OA received → completed within 1-3 days (usually the window is not too long)

Exam duration: approximately 60–90 minutes

Number of questions: 2 questions

Overall difficulty: Easy – Medium

If there is a system that usually brushes up on basic models such as prefix arrays, greedy, and array modeling, this set of questions is basically "sent to the branch."

Sharing real questions

Question 1|Split sorted array

Question 1|Split sorted array

To find all split points, the maximum value after sorting on the left half does not exceed the minimum value after sorting on the right half. Preprocess the prefix maximum value array and the suffix minimum value array, then traverse each split position, check whether the prefix maximum value is less than or equal to the suffix minimum value, and count if the conditions are met. This solves the problem in O(N) time.

Question 2|The array sum closest to zero

Question 2|The array sum closest to zero

First calculate the sum of all elements of the array, and then enumerate the effect of inverting each element (i.e. Multiplying by -1) on the sum. For each element that is negated, the new sum is the original sum minus twice the value of that element (because this is equivalent to removing that element from the sum plus its opposite). Iterate through all elements and find the result that minimizes the absolute value of the new sum.

More help

For many students who target major manufacturers, the biggest uncertainty in OA often comes from the on-site status - they can usually do it, but when it comes to the formal written test, it is easy to get stuck, lose control of time, or even affect the entire performance because of a small bug.

If they want to be more secure in the key written test, many students now prepare in advance OA seamless assist Solution: Without disrupting the rhythm of the exam, real-time idea prompts and key node reminders can be used to help quickly correct the direction of problem solving and avoid long-term problem jams. The whole process is more like a kind of "off-site navigation", allowing you to maintain clear thinking in a high-pressure environment.

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