Google Interview Tech+G&L Experience
Summary
I had my first of two interview rounds with Google for a SWE role. This post details my experience from Round 1, which included a technical problem focused on minimum cost transactions from streamed inputs, alongside several behavioral (Googliness & Leadership) questions. I hope this helps others prepare.
Full Experience
I recently had my first of two interview rounds with Google for a SWE role. This initial round was split into a 45-minute technical section and a 15-minute Googliness & Leadership (G&L) discussion. For the technical part, I was given one question to solve within 45 minutes, which I'd classify as a medium to easy problem. My advice, based on this experience, is to always think calmly during the interview, allocate most of your time to discussing your approach, analyzing complexity, and exploring alternatives, aiming to complete the coding part within about 7 minutes. The G&L section consisted of several behavioral questions. I'm looking forward to sharing my second round experience soon!
Interview Questions (4)
Given a list of structs, where each struct has the following fields: type, name, quantity, and cost. The type can be either 'Fizz' or 'Buzz'. For 'Fizz', there is an integer cost, and for 'Buzz', the cost is always 0. A transaction always occurs from 'Fizz' to 'Buzz'. Your task is to print all transactions that can happen with the minimum cost.
Notes:
1. Transactions must be processed on a first-come, first-serve basis, assuming streamed inputs.
2. The output should be formatted as: "FizzBuzz! quantity From(name):To(name) cost", ensuring no duplicate transactions are printed.
3. There will be no negative cost values.
Example Input:
[
{
type : "Fizz",
name: "Alice",
quantity: 2,
cost: 10
},
{
type : "Fizz",
name: "Catherine",
quantity: 3,
cost: 5
},
{
type : "Buzz",
name: "Bob",
quantity: 7,
cost: 0
},
{
type : "Fizz",
name: "Alice",
quantity: 5,
cost: 8
}
]Example Output:
FizzBuzz! 3 Catherine:Bob 15
FizzBuzz! 4 Alice:Bob 36Explanation:
First transaction from Catherine to Bob! quantity -> 3, cost -> (3 x 5) = 15
Second transaction from Alice to Bob! quantity -> 2, cost -> (2 x 10) = 20
Third transaction from Alice to Bob! quantity -> 2, cost -> (2 x 8) = 16
Tell me where you did something considerably out of hand to help someone.
Tell me about a time when you failed, and how you handled it.
Are you involved in any kind of leadership activity in your college?
Preparation Tips
My preparation approach involved focusing on calm and strategic thinking during the interview. I prioritized spending the maximum amount of time discussing the problem's approach, analyzing its complexity, and considering alternative solutions. My goal was to complete the actual coding within about 7 minutes after a thorough discussion.