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

SDE - 1

Google inc
upvote
share-icon
3 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Journey
I started with competitive programming on online platforms. After gaining enough confidence in my implementation skills, I moved on to solving higher-complexity questions. Following that, I focused on DSA practice. Online platforms gave me the confidence I needed in both my DSA and CP skills. Before interviews, I solved questions from interview experiences, as the questions there are more precise. This strategy helped me get the job interview.
Application story
The company came to campus, and I applied through the Google career portal. After that, an online assessment was conducted, and the shortlisted candidates proceeded to the interview round.
Why selected/rejected for the role?
In the second round of the interview, I mentioned the wrong time complexity, and since my branch is non-circuital, they did not take me to the next round.
Preparation
Duration: 12 months
Topics: Data Structures, OOPS, OS, DBMS, Networking
Tip
Tip

Tip 1: Practice as many questions as you can.
Tip 2: Complete at least two projects covering both frontend and backend.
Tip 3: Be honest on your resume; ensure you are thoroughly familiar with its contents, both theoretically and practically.

Application process
Where: Campus
Eligibility: Above 7 CGPA (Salary package: 21 LPA)
Resume Tip
Resume tip

Tip 1: Don't lie on your resume. You should have complete practical knowledge of everything mentioned in it.
Tip 2: Use bullet points for each key detail.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration60 minutes
Interview date31 Oct 2023
Coding problem2

1. NINJA'S JUMP

Hard
15m average time
85% success
0/120
Asked in companies
Morgan StanleyAmazonExpedia Group

Ninja is assigned a task to reach the last stone by his master. These stones are numbered with some value and in the form of an array. He is allowed to jump either odd-numbered jumps or even-numbered jumps and has to reach the last stone.

So your task is to find the number of starting index from which he may start jumping so he reaches the last stones. You are provided with the given array and you have to find the number of starting index of the array from which Ninja can reach the end of the array by jumping some number of times.

For jumping you have to follow below instructions:

You may jump forward from index ‘i’ to index ‘j’ (with i < j) in the following way:

During odd-numbered jumps (i.e., jumps 1, 3, 5, ...), you jump to the index ‘j’ such that ‘arr[i] <= arr[j]’ and ‘arr[j]’ is the smallest possible value. If there are multiple such indices ‘j’, you can only jump to the smallest such index j.

During even-numbered jumps (i.e., jumps 2, 4, 6, ...), you jump to the index ‘j’ such that ‘arr[i] >= arr[j]’ and ‘arr[j]’ is the largest possible value. If there are multiple such indices ‘j’, you can only jump to the smallest such index ‘j’.

Try solving now

2. Mail Rules

Easy
0/40
Asked in company
VMware Inc

Every valid email consists of a local name and a domain name, separated by the '@' sign. Besides lowercase letters, the email may contain one or more '.' or '+'.


If you add periods '.' between some characters in the local name part of an email address, mail sent there will be forwarded to the same address without dots in the local name. Note that this rule does not apply to domain names.


If you add a plus '+' in the local name, everything after the first plus sign will be ignored. This allows certain emails to be filtered. Note that this rule does not apply to domain names.


It is possible to use both of these rules at the same time.


Given an array of 'N' strings 'emails' where we send one email to each emails[i], return the number of different addresses that actually receive mails.


For Example :
Let 'emails' = ["test.email+alex@ninjas.com", "test.e.mail+bob.case@ninjas.com", "testemail@ninjas.com"].
We need to find the number of unique email addresses after applying the rules.

The first email "test.email+alex@ninjas.com":
The local name is "test.email+alex" and the domain name is "ninjas.com".
Applying the rules to the local name:
Remove '.' -> "testemail+alex"
Ignore everything after '+' -> "testemail"
The processed email address is "testemail@ninjas.com".

The second email "test.e.mail+bob.case@ninjas.com":
The local name is "test.e.mail+bob.case" and the domain name is "ninjas.com".
Applying the rules to the local name:
Remove '.' -> "testemail+bob.case"
Ignore everything after '+' -> "testemail"
The processed email address is "testemail@ninjas.com".

The third email "testemail@ninjas.com":
The local name is "testemail" and the domain name is "ninjas.com".
No '.' or '+' in the local name.
The processed email address is "testemail@ninjas.com".

The unique processed email addresses are {"testemail@ninjas.com"}.
Therefore, the number of different addresses that actually receive mails is 1.
Try solving now
02
Round
Medium
Face to Face
Duration60 minutes
Interview date1 Dec 2023
Coding problem1

1. Inplace rotate matrix 90 degree

Easy
12m average time
80% success
0/40
Asked in companies
OLX GroupSalesforceUrban Company (UrbanClap)

You are given a square matrix of non-negative integers of size 'N x N'. Your task is to rotate that array by 90 degrees in an anti-clockwise direction without using any extra space.

For example:

For given 2D array :

    [    [ 1,  2,  3 ],
         [ 4,  5,  6 ],
         [ 7,  8,  9 ]  ]

After 90 degree rotation in anti clockwise direction, it will become:

    [   [ 3,  6,  9 ],
        [ 2,  5,  8 ],
        [ 1,  4,  7 ]   ]
Problem approach

We mainly need to move first row elements to first column in revers order, second row elements to second column in reverse order.

Input: mat[][] = 

{{1, 2, 3, 4},
{5, 6, 7, 8}, 
{9, 10, 11,12}
{13, 14, 15, 16}} 
Output: 

{{4, 8, 12, 16}, 
{3, 7, 11, 15},
{2, 6, 10, 14},
{1, 5, 9, 13}}

Let us first try to find out a pattern to solve the problem for n = 4 

mat[0][0] goes to mat[3][0]
mat[0][1] goes to mat[2][0]
………………………………………
mat[1][0] goes to mat[3][1]
……………………………………..
mat[3][3] goes to mat[0][3]

Try solving now
03
Round
Medium
Face to Face
Duration60 minutes
Interview date1 Dec 2023
Coding problem1

1. Allocate Books

Hard
0/120
Asked in companies
ZSArcesiumAdobe

You are the Librarian of the Ninja library. There are ‘N’ books available in the library and ‘B’ ninjas want to read the books. You know the number of pages in each book and you have to allocate the books to the ‘B’ ninjas in such a way that the maximum number of pages allocated to a ninja is minimum.

Note

A book will be allocated to exactly one ninja. 
At least one book has to be allocated to a ninja.
Allotment of the books should be done in a contiguous manner. For example, a ninja can not be allocated book 2 and book 4, skipping book 3.

The task is to return the minimum of the maximum number of pages allocated to a ninja.

Problem approach

The idea is to iterate over all possible page limits, or maximum pages that can be allocated to a student.

The minimum possible page limit is the highest page count among all books, as the book with the most pages must be assigned to some student.
The maximum possible page limit is the sum of pages of all books, It is in the case when all books are given to a single student.
To find the number of students that will be allocated books for a page limit, we start assigning books to the first student until the page limit is reached, then we move to the next student and so on. As soon as we find the first page limit with which we can allocate books to all k students, we will return it.

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
115097 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58238 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35147 views
7 comments
0 upvotes