Google Online Assessment summer Intern ' 26

google logo
google
Summer Intern
July 22, 20252 reads

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)

Q1
K Criss-Cross
Data Structures & Algorithms

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.

Q2
Bits Transformation
Data Structures & Algorithms

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.

Discussion (0)

Share your thoughts and ask questions

Join the Discussion

Sign in with Google to share your thoughts and ask questions

No comments yet

Be the first to share your thoughts and start the discussion!