Google | L3 | Bangalore | Dec 2024 [Reject]

Total Work Experience: 2.5 years
Previous Company: Product based company
Education: old IIT non CSE

I interviewed for Google in Dec 24-Jan 25

Screening Round
Question: Their are few students who see a sequence written on the black board. They are remember parts of the sequence. You need the verify if the sequence remembered by the students is feasible or not.
Example 1
sequence_part_1 = [2,3,4,5]
sequence_part_2 = [3,5,9]
sequence_part_3 = [2,9]
Output: Valid
Example 2
sequence_part_1 = [2,3,4,5]
sequence_part_2 = [3,5,9]
sequence_part_3 = [9,4,11]
Output: In-Valid
[Note: these are not the exact testcases provided]
My Solution: After running throught the test-cases, it became evident to me that this is just a simple cycle detection problem.
Result: Positive

1st Onsite
Question: Given an array tasks, where tasks[i] denote the start time after which a task can be started. Find min time taken to complete the tasks, when you are given S machines and each mahine takes T time to complete a task. One machine cannot be assigned new task if it is already working on some task.
Example:
tasks = [3,3,2,1]
S = 2
T = 2
My Solution: Seemed easy-medium to me. Solved it using sorting and two-pointer (fixed sliding window whatever you want to call)
Result: Positive

2nd Onsite
Question: Same question: https://leetcode.com/discuss/interview-question/4820505/Google-question/
My solution: Tried a recurssive approach, interviewer wanted something else.
Result: Not-positive

3rd Onsite
Standard Gooliness round
Result: Positive

4th Onsite
Question: You have a n*(n-1) matrix consisting of 0s and 1s. Find out if there is a path from top-left to bottom-right corner where the number of zeros and ones along the path is same. You can visit the same tile multiple times.
My Solution: This question was quite tricky since you can travel to each cell multiple times.
There are two part to this solution:

  1. Check if there adjecent 0's or 1's, because if so there will exist a path with has equal 0's and 1's since the matrix is n*(n-1).
  2. if not then check all paths while visiting the cells only once.
    Result: Not-positive: Solved this with a lot of hints.

Overall rejected.

Comments (3)