Google Phone screen | SWE3 | SWEIII | L4 | Bangalore
- Location
- Bangalore
- Posted
- 22 Dec 2024
Summary
I recently had a phone screen interview with Google for the SWE3 position in Bangalore. During the interview, I was presented with a challenging string manipulation problem involving index matching.
How it went
I had a phone screen interview with Google for the SWE3 role in Bangalore. The interviewer presented a rather interesting problem centered around string processing and index matching. The problem involved working with a large string representing pi and finding specific indices that matched their corresponding digits in a 1-based indexing system, which required careful handling of multi-digit indices.
Questions asked (1)
- 01
Pi String Index Match
Data Structures & Algorithms · Medium
You are given
piin form of a string e.g.pi = "314159265359". You have to return a list of indexes wherei = pi[i].- Consider 1 based indexes.
- For multi digit indexes this is the matching criteria:
i = 456andpi[454] = '4' pi[455] = '5' pi[456] = '6'. - String length can go up to 10^6.