google logo
Google· Cloud AI Engineer

Recent google interview experience for Google Cloud AI engineer role

Posted
22 Oct 2026
6 reads

Summary

I interviewed for a Google Cloud AI Engineer role; the onsite DSA round featured a custom array problem and I was not selected due to bugs in my code.

How it went

My recent interview experience for Cloud AI engineer role

Role Related Knowledge
Here the she asked all the AI related terms definition, she was mostly interested in prompt injection, system instructions how they impact to AI.

Onsite DSA interview question
It was an array question: given an array [3,1,2,4,5] you need to calculate the maximum sum of a subarray, but the subarray sum is defined as the first element plus the last element of the subarray minus the sum of the middle elements.

Example: [3,1,2,4] → 4 + 3 – (1 + 2) = 4
The best valid subarray was [4,5] with answer 9.

This was the only question asked; I solved it using a current‑sum and max‑sum approach for the array and suggested an optimized approach using prefix‑sum logic. I was not selected due to some bugs in my code. Hope it helps for anybody preparing.

Questions asked (1)

  1. 01

    Maximum Modified Subarray Sum

    Data Structures & Algorithms

    Given an integer array, find the subarray that maximizes the value defined as:
    value = first element of subarray + last element of subarray – sum of all middle elements.
    For example, for the array [3,1,2,4,5], the subarray [4,5] yields the maximum value of 9 (4 + 5 – 0).

    Implement an algorithm to return the maximum possible value.

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Google recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

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