Google Online Assessment summer Intern ' 26
Summary
This post details an online assessment experience for a Google Summer Intern role in 2026, which included two distinct algorithmic challenges: 'K Criss-Cross' and 'Bits Transformation'.
Full Experience
Question 1
K Criss-Cross Problem Statement You are given:
An array of N integers: arr
An integer: P
Q queries, each containing two integers: A and K
For each query:
Add the value A to the array arr.
Find the K-th largest element X in the updated array.
Update P as: P=(P^X )mod(10^9+7) You need to determine the value of P after each query, and return the results.
Input You are given the following inputs:
An integer N: number of elements in the array
A list of N integers: arr
An integer P: initial value
An integer Q: number of queries
A list of Q queries, where each query is a pair of integers A and K
Output Return a list of Q integers, where each element represents the value of P after that query.
Question 2 :
Problem: Bits Transformation You’re given:
An array A of size N containing only 0s and 1s.
An integer K.
In one operation, you must flip exactly K elements in the array. Flipping means:
0 becomes 1
1 becomes 0
You can do this operation any number of times.
Your goal is to find the minimum number of operations needed to turn the entire array into all 1s.
If it's not possible, return -1.
Interview Questions (2)
You are given:
An array of N integers: arr
An integer: P
Q queries, each containing two integers: A and K
For each query:
Add the value A to the array arr.
Find the K-th largest element X in the updated array.
Update P as: P=(P^X )mod(10^9+7) You need to determine the value of P after each query, and return the results.
Input You are given the following inputs:
An integer N: number of elements in the array
A list of N integers: arr
A list of Q queries, where each query is a pair of integers A and K
Output Return a list of Q integers, where each element represents the value of P after that query.
You’re given:
An array A of size N containing only 0s and 1s.
An integer K.
In one operation, you must flip exactly K elements in the array. Flipping means:
0 becomes 1
1 becomes 0
You can do this operation any number of times.
Your goal is to find the minimum number of operations needed to turn the entire array into all 1s.
If it's not possible, return -1.