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

Fullstack developer Intern

Google
upvote
share-icon
1 rounds | 2 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 1 Month
Topics: Data Structures(Arrays, Tree, Backtracking, DP, Graph), Operating Systems, OOPS, Basic System Design, Algorithms, Machine Learning
Tip
Tip

Tip 1 : Try to come to basic working solution as early as possible
Tip 2 : Try to ask more questions from interviewer, to clarify the question even if you know the answer
Tip 3 : Try to keep your answer generalised because there might be follow-up questions on the present question
Tip 4 : Use proper variable names(instead of i or j in loop use itr1 or itr2 etc).
Tip 5 : Practice more questions of these topics: Arrays, Tree, Backtracking, DP, Graph

Application process
Where: Campus
Eligibility: No CGPA Criteria
Resume Tip
Resume tip

Tip 1 : Mention only those projects in which you are confident
Tip 2 : Try to keep your resume of at most 2 pages

Interview rounds

01
Round
Medium
Video Call
Duration45 Minutes
Interview date7 Sep 2021
Coding problem2

Very fixed deadline of interview of 45 min
Interviewer was friendly.
Difference between “==” and “===” operators in js.(Learn)
Explain Hoisting in javascript. (Learn)

1. Shortest path in an unweighted graph

Moderate
25m average time
70% success
0/80
Asked in companies
AmazonMicrosoftJP Morgan

The city of Ninjaland is analogous to the unweighted graph. The city has ‘N’ houses numbered from 1 to ‘N’ respectively and are connected by M bidirectional roads. If a road is connecting two houses ‘X’ and ‘Y’ which means you can go from ‘X’ to ‘Y’ or ‘Y’ to ‘X’. It is guaranteed that you can reach any house from any other house via some combination of roads. Two houses are directly connected by at max one road.

A path between house ‘S’ to house ‘T’ is defined as a sequence of vertices from ‘S’ to ‘T’. Where starting house is ‘S’ and the ending house is ‘T’ and there is a road connecting two consecutive houses. Basically, the path looks like this: (S , h1 , h2 , h3 , ... T). you have to find the shortest path from ‘S’ to ‘T’.

For example
In the below map of Ninjaland let say you want to go from S=1 to T=8, the shortest path is (1, 3, 8). You can also go from S=1 to T=8  via (1, 2, 5, 8)  or (1, 4, 6, 7, 8) but these paths are not shortest.

altImage

Try solving now

2. Dijkstra's shortest path

Moderate
25m average time
65% success
0/80
Asked in companies
Urban Company (UrbanClap)MicrosoftMorgan Stanley

You have been given an undirected graph of ‘V’ vertices (labeled 0,1,..., V-1) and ‘E’ edges. Each edge connecting two nodes (‘X’,’Y’) will have a weight denoting the distance between node ‘X’ and node ‘Y’.

Your task is to find the shortest path distance from the source node, which is the node labeled as 0, to all vertices given in the graph.

Example:

Input:
4 5
0 1 5
0 2 8
1 2 9
1 3 2
2 3 6

alt text

In the given input, the number of vertices is 4, and the number of edges is 5.

In the input, following the number of vertices and edges, three numbers are given. The first number denotes node ‘X’, the second number denotes node ‘Y’ and the third number denotes the distance between node ‘X’ and ‘Y’.

As per the input, there is an edge between node 0 and node 1 and the distance between them is 5.

The vertices 0 and 2 have an edge between them and the distance between them is 8.
The vertices 1 and 2 have an edge between them and the distance between them is 9.
The vertices 1 and 3 have an edge between them and the distance between them is 2.
The vertices 2 and 3 have an edge between them and the distance between them is 6.

Note:

1. There are no self-loops(an edge connecting the vertex to itself) in the given graph.

2. There can be parallel edges i.e. two vertices can be directly connected by more than 1 edge.
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

Which SQL clause is used to specify the conditions in a query?

Choose another skill to practice
Similar interview experiences
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Google
1714 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Google
4291 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 5 problems
Interviewed by Google
1931 views
0 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 3 problems
Interviewed by Google
10152 views
4 comments
0 upvotes