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

SDE - 1

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

Interview preparation journey

expand-icon
Preparation
Duration: 3 Months
Topics: OOPS, System Design, DP, DS, Coding Problems
Tip
Tip

Tip 1 : Practice aptitude
Tip 2 : Prepare well for the OOPS
Tip 3 : Read previous interviews

Application process
Where: Referral
Eligibility: NA
Resume Tip
Resume tip

Tip 1 : Don't lie on the resume
Tip 2 : Prepare 1 page resume

Interview rounds

01
Round
Easy
Video Call
Duration60 minutes
Interview date12 Nov 2021
Coding problem1

It was a coding round.

1. Shuffle Two Strings

Hard
50m average time
50% success
0/120
Asked in companies
SalesforceCIS - Cyber InfrastructureShareChat

You are given three strings “A”, “B” and “C”. Your task is to check whether “C” is formed by an interleaving of A and B. C is said to be interleaving “A” and “B”, if the length of “C” is equal to the sum of the length of A and length of B, all the characters of “A” and “B” are present in “C”, and the order of all these characters remains the same in all three strings.

For Example:
If A = “aab”, B = “abc”, C = “aaabbc”
Here C is an interleaving string of A and B. Because C contains all the characters of A and B and the order of all these characters is also the same in all three strings.

interleaving

If A = “abc”, B = “def”, C = “abcdefg”
Here C is not an interleaving string of A and B as neither A nor B contains the character ‘g’.
Try solving now
02
Round
Easy
Video Call
Duration90 minutes
Interview date14 Nov 2021
Coding problem3

It was also a coding round

1. Encode the Message

Easy
18m average time
90% success
0/40
Asked in companies
Chegg Inc.MicrosoftAmazon

You have been given a text message. You have to return the Run-length Encoding of the given message.

Run-length encoding is a fast and simple method of encoding strings. The basic idea is to represent repeated successive characters as the character and a single count. For example, the string "aaaabbbccdaa" would be encoded as "a4b3c2d1a2".

Try solving now

2. BST Iterator

Moderate
20m average time
65% success
0/80
Asked in companies
AmazonSalesforceFacebook

You are given a class named as BSTIterator that represents an iterator over inorder traversal of a binary search tree. You need to implement the following things as follows:

1. BSTIterator(Node root) - It is a parameterized constructor in which you are given the root of the Binary search tree. It will be called whenever an object of BSTIterator is created.

2. next() - This member function will return the next smallest element in the in-order traversal of the binary search tree. You need to implement this function.

3. hasNext() - This function will return true if there exists the next smallest element in the traversal else it will return false. You need to implement this function

The binary search tree has ‘N’ nodes you need to print the inorder traversal of the tree using the iterator.

Try solving now

3. Check If Two Nodes Are Cousins

Moderate
10m average time
90% success
0/80
Asked in companies
IBMSamsung R&D InstituteAmazon

You are given an arbitrary binary tree consisting of N nodes, where each node is associated with a certain value, and two node values, a and b, you need to check if these nodes are cousins.

Two nodes are cousins of each other if they are at the same level and have different parents. Two nodes are said to be at the same level if the distance of both the nodes from the root node is the same.

A binary tree (BT) is a data structure in which each node has at most two children.

For the given binary tree:

alt txt

4 and 7 are cousins of each other since they are at the same level and have different parents, 3 and 2 respectively.
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