Google inc interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Google inc
upvote
share-icon
2 rounds | 2 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 1 month
Topics: DFS, BFS, Linked List, Dijkstra's, HashMap
Tip
Tip

Tip 1 : Practice questions regularly
Tip 2 : Take company specific problems

Application process
Where: Company Website
Eligibility: None
Resume Tip
Resume tip

Tip 1 : Add 2-3 good quality projects
Tip 2 : Single-page resume with all project links, profile links, and internship experience mentioned.

Interview rounds

01
Round
Easy
Telephonic
Duration45 minutes
Interview date6 May 2022
Coding problem1

The interviewer didn't explain the problem very well and didn't provide any hints. I had to take an example on my own.

1. Chocolate Pickup

Hard
29m average time
0/120
Asked in companies
AppleOracleChegg Inc.

Ninja has a 'GRID' of size 'R' X 'C'. Each cell of the grid contains some chocolates. Ninja has two friends Alice and Bob, and he wants to collect as many chocolates as possible with the help of his friends.

Initially, Alice is in the top-left position i.e. (0, 0), and Bob is in the top-right place i.e. (0, ‘C’ - 1) in the grid. Each of them can move from their current cell to the cells just below them. When anyone passes from any cell, he will pick all chocolates in it, and then the number of chocolates in that cell will become zero. If both stay in the same cell, only one of them will pick the chocolates in it.

If Alice or Bob is at (i, j) then they can move to (i + 1, j), (i + 1, j - 1) or (i + 1, j + 1). They will always stay inside the ‘GRID’.

Your task is to find the maximum number of chocolates Ninja can collect with the help of his friends by following the above rules.

Example:
Input: ‘R’ = 3, ‘C’ = 4
       ‘GRID’ = [[2, 3, 1, 2], [3, 4, 2, 2], [5, 6, 3, 5]]
Output: 21

Initially Alice is at the position (0,0) he can follow the path (0,0) -> (1,1) -> (2,1) and will collect 2 + 4 + 6 = 12 chocolates.

Initially Bob is at the position (0, 3) and he can follow the path (0, 3) -> (1,3) -> (2, 3) and will colllect 2 + 2 + 5 = 9 chocolates.

Hence the total number of chocolates collected will be 12 + 9 = 21. there is no other possible way to collect a greater number of chocolates than 21.
Problem approach
  1. I solved it in O(n^2) 

    1. first I stored all the friends of 0 (given as input) in hashmap
    2. I kept counter maxCommonFriends = 0 for maximum no common friends and vector to store all suggested friends
    3. For all non-friends of 0 I calculated common friends with 0, if common friends > maxCommonFriends I updated the counter and           suggested friends list will contain only current else if common friends == maxCommonFriends, add current to the list
    4. At the end return list of suggested friends.
Try solving now
02
Round
Easy
Video Call
Duration60 minutes
Interview date6 May 2022
Coding problem1

The interviewer was helpful.

1. Overlapping Intervals

Easy
24m average time
0/40
Asked in companies
SprinklrAdobeAmazon

You have been given the start and end times of 'N' intervals. Write a function to check if any two intervals overlap with each other.

Note :
If an interval ends at time T and another interval starts at the same time, they are not considered overlapping intervals.
Problem approach

Step 1 : I kept 2 counters i = 0 (for 1st process), j = 0 (for 2nd process)
Step 2 : Added the storage for both and added the process which ends first

Try solving now

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
1 rounds | 1 problems
Interviewed by Google inc
6180 views
0 comments
0 upvotes
company logo
SDE - 1
1 rounds | 1 problems
Interviewed by Google inc
1573 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 3 problems
Interviewed by Google inc
0 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 3 problems
Interviewed by Google inc
0 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
115096 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58237 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35146 views
7 comments
0 upvotes