google logo
Google· SDE I

Google L3 Phone screen round

Posted
14 Apr 2025
448 reads

Summary

I experienced a Google L3 phone screen round where I was given a problem similar to LeetCode's 'Move Pieces to Obtain a String' with a follow-up. I solved the initial part but ran out of time on the follow-up, ultimately leading to rejection.

How it went

Exactly same as but problem was framed in different way: https://leetcode.com/problems/move-pieces-to-obtain-a-string/description/

Follow up: What if pieces can go out of scope of array?

intialState: "_ L _ L L _ R L _ R R R _"

targetState: "_ _ _ _ L _ R L _ _ _ _ R"

output:  true

Was able to solve first part For follow up told that we can remove the chunk of L's from beginning and same for R's from end. And check the middle part using original problem.

He told it is not necessary that pieces will be removed. I mean we need to track indexes. Time was over.

Will I get call for onsites?

Edit: I was rejected. Reason given was that he gave hints ( he just told one edge case, which i think was even mentioned as edge case because problem statement was not explained precisely, that too was discussed before writing the code. My code covered all edge cases in first run.)

Anyways, they wont even match my current base, forget about my base after appraisel.

Questions asked (2)

  1. 01

    Move Pieces to Obtain a String

    Data Structures & Algorithms

    The problem was exactly the same as LeetCode's 'Move Pieces to Obtain a String' but framed in a different way.

    Open the problem
  2. 02

    Move Pieces to Obtain a String with Out-of-Scope Movement

    Data Structures & Algorithms

    Follow up: What if pieces can go out of scope of array?

    Given:

    intialState: "_ L _ L L _ R L _ R R R _"
    
    targetState: "_ _ _ _ L _ R L _ _ _ _ R"
    
    output:  true
    
    

    The interviewer suggested that we could remove chunks of 'L's from the beginning and 'R's from the end, then check the middle part using the original problem logic, but then clarified that pieces might not be removed and we need to track indexes.

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!