Google L3 Phone screen round

google logo
google
SDE I
April 14, 20257 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.

Full Experience

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.

Interview Questions (2)

Q1
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.

Q2
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.

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!