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

L3 Engineer

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

Interview preparation journey

expand-icon
Preparation
Duration: 4 months
Topics: Data Structures, Algorithms, OOPs, OS, DBMS, Competitive programming
Tip
Tip

Tip 1 : Know your projects in depth.
Tip 2 : Focus on getting time and space-optimized solutions in interviews. 
Tip 3 : Solve company-specific problems before the interview.

Application process
Where: Campus
Eligibility: No criteria
Resume Tip
Resume tip

Tip 1 : Know the mentioned projects thoroughly. 
Tip 2 : Try to include the keywords in the Job description in your resume.

Interview rounds

01
Round
Medium
Online Coding Test
Duration60 minutes
Interview date9 Jul 2022
Coding problem2

Time window - (12 - 4 PM)
Can attempt anytime between the window.

1. Count Pairs

Easy
0/40
Asked in companies
HCL TechnologiesGoogle inc

Given an array of integers ‘A’, and an integer ‘K’ find the number of happy elements.

Element ‘X’ is happy if there exists at least 1 element whose difference is less than ‘K’ i.e. an element ‘X’ is happy if there is another element in the range [X-K, X+K] other than ‘X’ itself.

For Example:
If N=3 and K=1 and array elements are [1,2,5]. 

For A[0], A[1] is the element that lies in the range [0,2] so, A[0] is the happy element.
For A[1], A[0] is the element that lies in the range [1,3] so, A[1] is the happy element.
For A[2], there is no element that lies in the range [4,6] other than A[2] so, A[2] is not the happy element.

Hence, the output will be 2.
Try solving now

2. Min binary partition

Easy
15m average time
85% success
0/40
Asked in companies
WalmartGrabGoogle inc

You are given a string ‘S’ of size ‘N’ where ’S’ contains only characters ‘0’ and ‘1’. Your task is to divide ‘S’ into ‘K’ contiguous substrings such that the following conditions hold true :

1. Let ‘X’ be a binary number formed by reading a substring of ‘S’ from left to right.
2. ‘X’ must not contain leading zeroes.
3. The decimal equivalent of ‘X’ must be a power of 5.
4. K must be the minimum possible.
Note :
If no such ‘K’ possible, then you need to return -1. 
Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date2 Aug 2022
Coding problem1

45 minutes was for 1 DSA problem and 15 mins is for googelyness.

1. Design Browser History

Moderate
25m average time
75% success
0/80
Asked in company
Google inc

Your task is to maintain a data structure that supports the following functions of a web browser.

1- Browser(homepage): Set homepage of the browser

2- Visit(url): Visit the url from the current page. It clears up all the forward history.

3- Back(steps): Move ‘steps’ backward in the browser history

4- Forward(steps): Move ‘steps’ forward in the browser history
Note:
If you can’t move steps forward or backward, just return the last website that can be reached.

The Queries are in the given format-:
The first line of each query contains the string representing the homepage of the web browser.

(1, url): Visit the url from the current page. 

(2, steps): Move ‘steps’ backward in the browser history.

(3, steps): Move ‘steps’ forward in the browser history.
For example:
You are queries as  [[“homepage.com”], [1 , “facebook.com”], [1, “codingninjas.com”],[2, 1], [3, 1]]
1 query is the query that sets the homepage as “homepage.com”.
2 query is the query to visit “facebook.com”
3 query is the query to visit “codingninjas.com”
4 query is the query that moves back one step to “facebook.com”
5 query is the query that moves forward one step to “codingninjas.com”

Hence the answer is [“facebook.com”, “codingninjas.com”]
Try solving now
03
Round
Medium
Video Call
Duration60 minutes
Interview date2 Aug 2022
Coding problem1

60 mins were spent on a single problem.
Starting from naive approach, optimized the problem.

1. Find the median of all subarrays of a particular size.

Moderate
30m average time
70% success
0/80
Asked in companies
OlaAdobeFlipkart limited

You have been given an array/list ‘ARR’ of integers consisting of ‘N’ integers. You are also given a size ‘M’. You need to display the median of all the subarrays of size ‘M’ and it is starting from the very left of the array.

Median is the middle value in an ordered integer array/list. If the size of the array/list is even there is no middle element. So the median is the mean of two middle values in an even size array/list.

Your task is to return the median of all the subarrays whose size is ‘M’.

Example:
Let’s say you have an array/list [1,4,3,5] and ‘M’ is 3.Then the first subarray of size 3 is [1,4,3] whose median is 3.Then the second subarray of size 3 is [4,3,5] whose median is 4. Therefore the median of all the subarrays of size 3 is [3.0,4.0].
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 - Intern
2 rounds | 4 problems
Interviewed by Google inc
3049 views
3 comments
0 upvotes
company logo
SDE - 1
1 rounds | 1 problems
Interviewed by Google inc
1573 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 5 problems
Interviewed by Google inc
1279 views
0 comments
0 upvotes
company logo
SDE - Intern
3 rounds | 5 problems
Interviewed by Google inc
1370 views
0 comments
0 upvotes