Google Data Scientist Interview Experience — A Next-Word Predictor Coding Round Plus BQ

Google·Data Scientist·Feb 2026
HR ScreenTechnical Screeneasy

This round's interview question: given some training sentences, write two functions — a training function and a predictor function. The predictor function should take a word as input and output what the first word after that word could be.

Example:
["I", "am", "Sam"]
["Sam", "I", "am"]
["I", "like", "green", "eggs", "and", "ham"]

My approach: in the training function, use a dictionary to count how many times each word's next word appears; in the predictor function, just iterate through this dictionary.

First follow-up: the predictor function above was O(k) time, where k is the number of possible next words, and they wanted it optimized to O(1).

My approach: during training, precompute each word's possible next words ahead of time and store them in a dictionary.

Second follow-up: now they wanted predict to return a probability-weighted result. For example, for the word "I", the next word could be "am" or "like" — "am" showed up twice as a next word and "like" showed up once, so the new predict function should return "like" with 1/3 probability and "am" with 2/3 probability.

My approach: use Python's built-in random.choices.

Second round was BQ:

  1. Tell the interviewer about your background and why you think you're a good fit for Google.
  2. Describe a problem your team ran into — how did you spot it and how did you solve it?
  3. If your project didn't ship on schedule, how would you explain that and what would you do to improve?
  4. If you went on an outdoor team activity with your Google team meant to build team cohesion, and you let team members vote on which activity they'd like, but some people don't want to participate, what would you do?

Published

Curated and edited by PracHub

Practice the questions from this interview

Discussion

Sign in to join the discussion. The author is notified of every comment.

Loading comments…

Interview at a glance

Company
Google
Role
Data Scientist
Rounds
Technical Screen → HR Screen
Difficulty
easy
Interview date
Feb 2026
Questions from this interview
1 question

Real Google interview experiences

First-hand reports from Google candidates — the rounds, the questions they were asked, and how it went.

All 127 Google interview experiences