Google Internet company 2026 Intern's OA finally opened at the end of August, which is quite late compared to other big companies. This year, the question type continues the previous style, which is still clear logic and algorithmic questions. I'll organize two OA questions that I've done before, and the questions and ideas are quite representative, so I'll give you a reference.
Google Online Assessment Overview of interviews
- Platform: Some batches at Codility, some batches at HackerRank
- duration: 75 minutes or so
- quantity of questions: 2 algorithmic problems (arrays/prefixes and suffixes/math thinking)
- difficulty feeling: Overall moderate, not too long of a question, but you need to grasp the core idea to get it right easily
- investigation point:
- Combination of arrays and mathematical derivations
- Ideas for handling prefix max / suffix min
- Time complexity requires O(n) or O(n log n), violence will timeout
- suggestion: Be sure to familiarize yourself with Google's OA questions in advance, focusing on "discovering patterns → converting questions".
Review Of Interview Questions
Question 1: Minimize Absolute Sum After One Change
Given an integer array, you may flip at most one element (multiply it by -1).
Find the minimum possible absolute value of the array sum after the change.
Example
Input. [2, -3, 5]
Output. 0
Explanation: Original sum = 4. Flipping 5 → sum = -1, abs = 1. Flipping 2 → sum = 0. So the best result is 0.
Analyze the ideas
- First calculate the original array sum
s. - If you flip an element
a[i]The sum becomess - 2*a[i]. - Iterate over each element, taking
min(abs(s - 2*a[i])). - final communion with
abs(s)comparison, the answer is the minimum of the two.
The key here is to convert "multiply by -1" to "sum change -2*a[i]". The implementation is just one traversal with complexity O(n).
Question 2: Count Sorted Split Ways
You are given an array. You want to split it into two non-empty parts: left and right.
Then sort each part in non-decreasing order, and concatenate them.
Return the number of ways to split the array so that the final concatenated array is sorted.
Example
Input. [2, 1, 3, 5]
Output. 2
Explanation.
- Split at index 1 → left
[2], right[1,3,5]→[2,1,3,5]not sorted. - Split at index 2 →
[2,1] | [3,5]→[1,2,3,5]sorted ✅. - Split at index 3 →
[2,1,3] | [5]→[1,2,3,5]sorted ✅.
Analyze the ideas
- After sorting, the maximum value of the left segment is
max(left), the minimum value of the right-hand segment ismin(right). - Whether the splices are ordered or not, as long as they satisfy
max(left) <= min(right)Ready to go. - So traverse each cut point and determine if the condition holds or not.
- The implementation can be preprocessed first:
prefix_max[i]denotes the maximum value of the first i elementssuffix_min[i]denotes the smallest value from i to the end
- The final statistic satisfies
prefix_max[i] <= suffix_min[i+1]The number of segmentation points is sufficient with complexity O(n).
This question is ostensibly a 'mock sort', but it's actually a classic trope for 'prefix/suffix information'.
Google Online Assessment Summary
The style of these two OA questions is typical: the questions look simple, but the core lies in the ability to quickly find mathematical patterns or prefix and suffix relationships. The first question is "Equivalent Transformation of Numerical Flipping", and the second question is "Maximum and Minimum Boundary Conditions for Array Splicing". As long as the idea is clear, the code implementation is not difficult.
The Road to Offer is Not Alone
When many students do Google OA, they will encounter the situation of "stuck in thought → time is dragged away". programhelp provides no trace of online help:
- Real-time voice reminders help you get stuck and turn your thoughts around, so you won't get stuck in brute force;
- Remote online assistance to ensure efficient and error-free code implementation;
- Practice Google's high-frequency OA question bank in advance to simulate a real-world environment.
Don't die alone. There's Programhelp In, OA can also easily take ✅.