Panda Guru LogoPanda
Guru

Google | L4 | US | Phone + Onsite

Phone Screen

Questions: Implement a string replacement object that supports:

  1. store(key: str, value: str) -> None; stores a certain value as key
  2. convert(input: str) -> str; convert an input string that utilizes a previously stored key
    • i.e., if we have already made a call of store(key="USER", value="leetcoder22"), then convert("username is $USER$") should return "username is leetcoder22".
  3. Follow-up: What if we want to include "$" as part of a key?
Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.


Onsite 1

Questions: In a game, player 1 picks a five-letter secret word with no duplicates and player 2 tries to guess it. For every guess, player 1 scores the guess out of 5, indicating how many letters exist within the secret word.

  1. Implement score(secret: str, guess: str) -> int; return the score player 1 gives player 2; i.e., score("teams", "abide") returns 2.
  2. Implement is_possible_guess(hist: typing.Any, guess: str); given previous guessing history and their scores, see if the next guess is a reasonable next guess.
  3. Implement next_guess(hist: typing.Any) -> str; given previously guessed words and their scores, what should player 2 guess?
Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.


Onsite 2

Questions: Given a word indicating the ordering of a foreign alphabet, examine if an input string is sorted in that order.

Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.


Onsite 3

Questions: Implement a restaurant waiting list system that supports:

  1. Given a party size, put the party in the waitlist, return a party id.
  2. Given party id, remove party from the waitlist.
  3. Given a party size, get the next waiting party of that size, return party id.
Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.