Google L4 AI/ML interview experience

google logo
google
L4 AI/MLOngoing
November 23, 202576 reads

Summary

I interviewed for an L4 AI/ML role at Google, clearing the phone screen, DSA, AI/ML, and GnL rounds. I am currently awaiting team matching and a push to the Hiring Committee, but I'm feeling a sense of rejection already.

Full Experience

Phone Screening

I was presented with a problem: given N CPUs and the time taken to finish each of M tasks, I had to find the minimum time to finish all tasks. A single CPU could only execute one task at a time, with no cooldown involved. For the follow-up, I was asked to find the least number of CPUs needed to achieve that minimum time, assuming it was already found.

Solution

I initially proposed a heap-based solution, but the interviewer later inquired if a heap was truly necessary. I then solved it using an array. For the follow-up, I employed binary search to call the function.

Verdict: Cleared

DSA Round

In this round, I encountered a problem involving an N x M grid of dots. I needed to determine the number of unlock patterns having a length of at least L. I was allowed to start anywhere and visit only available and unvisited neighbors (up, down, right, left, and all 4 diagonals). I couldn't jump over a visited dot. The follow-up question was to add linear optimization.

Solution

I provided a backtracking-based solution. For the optimization, I managed to make it four times faster by utilizing vertical and horizontal symmetry.

AI/ML Round

I was given two arrays of integers and asked to find out in which array a given query integer should lie.

Solution

My initial approach was a clustering-based solution, which I later optimized for variance by considering the distance from existing data points.

GnL Round

This round involved basic situational questions and concluded within 30 minutes.

Current Status

Team matching rounds will be arranged, after which managers will push my profile to the Hiring Committee. Despite clearing the rounds, I am already feeling rejected.

Interview Questions (3)

Q1
Minimum Time to Finish Tasks with N CPUs
Data Structures & Algorithms

Given N CPUs and the time taken to finish each of M tasks, find the minimum time to finish all tasks. One CPU can only execute one task at a time, no cooldown involved. Follow up: Suppose you find the minimum time, what is the least number of CPUs you can use to achieve that minimum time?

Q2
Number of Unlock Patterns in N x M Grid
Data Structures & Algorithms

Given an N X M grid of dots, what is the Number of unlock patterns having length at least L? You are only allowed to start anywhere and visit neighbors (up, down, right, left and 4 diagonals), whichever available and unvisited. You can't jump over visited dot. Follow up: Add linear optimisation

Q3
Query Integer Array Classification
Other

Given two array of integers, find out in which array a given query integer should lie.

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!