google logo
Google· SDE II

Google PhoneScreening SDE2

Experience
4 years
Posted
16 Apr 2025
368 reads

Summary

I had a phone screening for an SDE2 role at Google where I was asked to implement a movie recommendation system based on transitive similarity. I was rejected due to nervousness, mixing up syntax, and using the wrong heap type.

How it went

YOE : 4Y+

Question Similar to

movie recommendation system. Each movie has a title and a rating, if the process has marked movie A as similar to movie B, and movie B similar to movie C, we will also consider movie A as similar to movie C

Given a movie from the list, return its N similar movies with highest rating.

For example, if we have the following four movies:

"Movie A" with rating 6 "Movie B" with rating 7 "Movie C" with rating 8 "Movie D" with rating 9 and the process has determined the following similarities:

"Movie A" is similar to "Movie B" "Movie B" is similar to "Movie C"

Solution I gave

https://leetcode.com/playground/YvepGCT9

Verdict : Reject

I was not prepare for the Interview got very nervous about approach so I mixed up with java and C++ syntax as it was just a normal text editor didn;t get noticed

Instead of min heap used Max heap

But this was the overall code that I used

Questions asked (1)

  1. 01

    Movie Recommendation System with Transitive Similarity

    Data Structures & Algorithms

    Implement a movie recommendation system. Each movie has a title and a rating. If a process marks movie A as similar to movie B, and movie B as similar to movie C, then movie A is also considered similar to movie C (transitive property).

    Given a movie from the list, return its N similar movies with the highest rating.

    For example, if we have the following four movies: "Movie A" with rating 6 "Movie B" with rating 7 "Movie C" with rating 8 "Movie D" with rating 9

    And the process has determined the following similarities: "Movie A" is similar to "Movie B" "Movie B" is similar to "Movie C"

    Open the problem

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!