Google 2026 New Grad OA new question express | Google OA sharing

40 Views
No Comment

This time Google The 2026 New Grad OA has indeed introduced new questions, and it feels like the question bank has finally started to move. The overall difficulty is not particularly tricky, but it is actually quite easy to waste time if your thinking goes astray. The process is still the same. I start directly after taking photos and verifying it. I finish writing the main body in about ten minutes. After submission, the system added two more test cases, which were considered a small stress test. Fortunately, the idea itself was relatively stable, and AC was successfully completed in the end. Let’s briefly talk about the core solutions to the next two questions.

Coding 1

Given an array A, representing the height of students. All students need to line up in a number of teams, and students will arrive in sequence in the order they appear in the array. For the i-th student, if there is a team in which all students are taller than A[i], then the student can join any of the teams; if such a team does not exist, the student needs to create a new team. Your task is to calculate the minimum number of teams that will eventually be created.

Please write a function: given a non-empty integer array A (length N), return the minimum number of teams created.

Google 2026 New Grad OA

Problem solving ideas

The essence of this question is to maintain several teams with "strictly decreasing tails". Every time a student comes, go to the row where the tail of the current team is taller than him, and try to put him in, so as to leave more space for the students behind him. If there is no qualified team, a new row will be opened. When implementing, you can use an array to record the end of each row and keep it in order, and then use binary search to find the first position that is greater than the current height and replace it; if it cannot be found, add a new team. The whole is a typical greedy + bipartite maintenance monotonic structure (LIS deformation), and the time complexity can be achieved O(n log n).

Coding 2

There are several processes that need to be performed. Each process imposes a certain load on the server it is running on, represented by an integer. The total load on a server is equal to the sum of the load on all processes on it. Now that you have two servers available, you need to distribute all processes to these two servers so that the absolute value of their total load difference is minimized.

Please write a function: given an array A containing N integers, where each element represents the load of the corresponding process, the function should return the minimum absolute value of the load difference between the two servers.

Google 2026 NG OA

Problem solving ideas

The goal is to keep the loads of the two servers as close as possible, so the problem can be transformed into: select a subset of processes from the array so that their sum is as close as possible to half the sum of all loads. Let the sum be S, just find a subset that is closest to S/2, the final difference is S - 2 * subsetSumTarget=S/2 Target=S/2 Just go down and find the first feasible value. The time complexity is usually O(n*S), completely feasible in OA scenarios where the data range is not extreme.

Google 26 NG SDE OA experience sharing

By the way, let’s talk about the overall experience of this OA. I hired programhelp to do the whole process. OA assistance , helped me save a lot of time in trial and error. Especially for this kind of OA that requires quick identification of question types, someone can remind you of the direction at key points, which is not at the same level of efficiency as your own hard thinking. In the end, the test cases for supplementary testing after submission have also been stabilized, and there have been no repeated modifications. In summary, the mentality will be much more relaxed. If you are currently preparing for OA from Google or other major manufacturers, if you reduce these uncertain factors in advance, the pass rate will actually be much higher.

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