• Company: Google

Round 1 : DSA Round

  • There is a three-digit combination lock (note that the order matters in a combination lock, so a more apt name might be "permutation lock").3 Each digit rotates in a circular fashion, e.g., 0,1,2,3,N-1,0,1,2... There are two lock combinations that can unlock this, one set by the user and the other is a bypass combination. The tolerance of error is t, meaning as long as each digit is within t of the set number, the lock will open. For example, if Nis 10 and t is 2, the user and the bypass combinations are: 0,1,2 3,4,5 then either 0,9,4 or 1,3,7 can open the lock, but 0,4,5 will not. Now given input N, vector user, vector bypass, tolerance, write a function to output the number of I distinct lock combinations (mathematical permutations, since order matters) that can open the lock.

Round 2 : DSA Round

  • Design a game server where when we give an input of candidate, the class should return the candidate rating closer to that candidate. Each candidate has a candidate rating. We have a buffer diff also within which the new player can come. Idea is sorting based on rating and using left by index

Round 3 : DSA Round

  • You are given a list of on-call intervals for multiple employees. Each interval contains a start time, an end time, and the person's name (e.g., {"Alice", 1, 5}). The goal is to return a sequential timeline showing exactly who is on call during every distinct time segment. Example Input Plaintext Alice: [1, 5], [10, 14] Bob: [3, 8], [12, 15] Expected Output If you trace the timeline from left to right, the composition of who is on call shifts at specific timestamps: Time [1, 3]: Only Alice is on call. Time [3, 5]: Both Alice and Bob are on call. Time [5, 8]: Only Bob is on call. Time [8, 10]: Nobody is on call (skip or ignore depending on interviewer preference). Time [10, 12]: Only Alice is on call. Time [12, 14]: Both Alice and Bob are on call. Time [14, 15]: Only Bob is on call.

Please take a moment to share your interview experience. Every experience helps thousands of aspirants prepare better, and your contribution plays a vital role in helping our community grow. ❤️

WhatsApp Icon

Hi Instagram Fam!
Get a FREE Cheat Sheet on System Design.

Hi LinkedIn Fam!
Get a FREE Cheat Sheet on System Design

Loved Our YouTube Videos? Get a FREE Cheat Sheet on System Design.