Screening Round with Google !!!

Posted
8 Apr 2025
350 reads

Summary

I had a disappointing screening round with Google where I struggled to understand and solve a complex string parsing problem, despite extensive DSA preparation.

How it went

I've been preparing for DSA for over three months, diligently solving more than 372 problems on LeetCode. But what happened next was something I never expected. When you fail to understand the question, what worse could possibly occur? Here's the question that left me baffled:

I realized that the problem required a brute force approach, utilizing a hashMap to check if a sequence exists and decide whether to extend it or not. However, the first rule contradicted my assumptions, leading to confusion. I spent over 30 minutes trying to understand the problem before finally started coding as a last resort.

Interviewer did walk me thorough the appraoch as below. If not seen in map, add it in map and also in sequence. if seen in map extend it. But i was still not clear on when we cant extend. e.g. abccccd 1 - a not seen put in map extend sequence map[a],res:[a] 2 - b not seen put in map extend sequence map[a,b], res:[a,b] 3 - c not seen put in map extend sequence map[a,b,c] res:[a,b,c] 4 - c seen put in map extend the sequence map[a,b,c,cc] res:[a,b,c,cc] 5 - here we cant extend c as cc and cc as ccc beause it breaks rule one so we have to take cd here. i was really confused with what rule we took cd as d is not seen yet. Either my uderstanding was going wrong or the interviewer was not getting what i am asking.

This was a disappointing experiance. I am greatful to google and the interviewer for this opportunity.

Questions asked (1)

  1. 01

    Get Phrases from String with Rules

    Data Structures & Algorithms

    Given a string get the phrases. e.g goooooogle, res = g, o, oo, ooo, gl, e e.g abccccd, res = a,b,c,cc,cd

    Rules: 1 - Concatenating all phrases should recreate the original string. 2 - You can extend the phrase with a previously seen phrase or start a new one if not seen. 3 - each phrase has to be as long as possible.

How they prepared

I've been preparing for DSA for over three months, diligently solving more than 372 problems on LeetCode.

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!