Open In App

Google Interview Experience | Set 7 (For Software Engineering Intern)

Last Updated : 03 Dec, 2017
Like Article

Round 1: Coding Sample

In this coding sample, I was given 90 minutes to answer 2 coding questions.

Question 1: Given a string A consisting of n characters and a string B consisting of m characters, write a function that will return the number of times A must be stated such that B is a substring of the repeated A. If B can never be a substring, return -1.

A = ‘abcd’
B = ‘cdabcdab’
The function should return 3 because after stating A 3 times, getting ‘abcdabcdabcd’, B is now a substring of A.

You can assume that n and m are integers in the range [1, 1000].


Question 2: Consider an undirected tree with N nodes, numbered from 1 to N. Each node has a label associated with it, which is an integer value. Different nodes can have the same label. Write a function that, given a zero indexed array A of length N, where A[j] is the label value of the (j + 1)-th node in the tree and a zero-indexed array E of length K = (N – 1) * 2 in which the edges of the tree are described, returns the length of the longest path such that all the nodes on that path have the same label. The length is the number of edges in that path.


A = [1, 1, 1, 2, 2]
E = [1, 2, 1, 3, 2, 4, 2, 5]

This tree is shown below. A node follows the form label, value.

----------1, 1

-----1, 2        1, 3

2, 4      2, 5

The function should return 2, because the longest path is 2->1->3, and there are 2 edges in this path.

Assume that 1 <= N <= 1000 and each element of the array A is an integer in the range [1, 1000000000].


Round 2: Phone Interview

In this phone interview I was given one question.

Question: Write a function that takes a list L and returns a random sublist of size N of that list. Assume that the indexes must be in increasing order. That is, you cannot go backwards.


L = [1, 2, 3, 4, 5]
N = 3

The function should return one of these lists:

[1, 2, 3]
[1, 2, 4]
[1, 2, 5]
[1, 3, 4]
[1, 3, 5]
[1, 4, 5]
[2, 3, 4]
[2, 3, 5]
[2, 4, 5]
[3, 4, 5]


Round 3: Phone Interview

I was again asked only one question.

Question: Given a list L of video names and their watch rates, write a function that will return the videos with the top 10 watch rates. Video names may appear more than once.


L = [(‘abc’, 10), (‘def’, 15), (‘ghi’, 10), (‘abc’, 12), …, (‘xyz’, 100)]

The function should return [‘xyz’, ‘abc’, …, ‘def’, ‘ghi’]

I solved all the questions but, unfortunately, I was not selected. Though I was not selected, I had a very positive experience. My interviewers and recruiters were all pleasant to work with. I will definitely try again next year and hopefully, I will clear it and get selected for a full time job.


Tips for Interview:

Ask questions. The interviewer will purposely give you a vague question in hopes of you asking the necessary questions to clarify it for yourself.

Don’t panic. I know it can be nerve racking to go on an interview, especially if it’s your first. But, nerves are only going to make it worse. Collect yourself, and if you don’t know the answer, it’s okay. Think through it for a few minutes and I’m sure anyone can come up with a solution. These questions are designed for you to be able to solve in the allocated time for an interview.

THINK OUT LOUD! I can’t stress this one enough. You are also being judged on your thought process. If your interviewer doesn’t know what you are thinking, they can’t throw you hints or correct you in any way. And believe me, they want to see you succeed. They are there to help you and guide you through the problem.

Other than that, study, study, study. Do as many algorithmically challenging problems as you can. Cracking the Coding Interview and Geeks for Geeks will be your best friends through the study process. Take advantage of these resources.

Previous Article
Next Article

Similar Reads

Google Interview Experience for Software Engineering Intern
I am a second-year BCA student currently studying in 3rd semester in Acharya Institute of Graduate studies. I applied through Google career page, The recruiter directly contacted me, I had applied the position for software engineering intern in Zurich Switzerland Round 1: In this coding Sample, I was given 45 minutes to solve the question. In this
3 min read
Google Work Experience as a Software Engineering Intern
Google, Mountain View, CA Summer 2023Project: Changing this mode off to one second enabled the security system to send alerts only when an intruder was almost breaking in thereby saving energy costs. Overview:In the internship at Google, I was so excited to join the Map section and undertake the project of revamping real-time location marketability
2 min read
Google Software Engineering Intern, Fall 2019 - North America
Content Removed
1 min read
Microsoft Interview Experience for Software Engineering Intern 2022
Hey there! I recently went through the internship process at Microsoft for the SDE Intern role. Through this blog, I would like to share my experience of the entire interview process. This was an on-campus opportunity, for which I applied through the Microsoft Careers portal for the respective job post(
9 min read
Microsoft Interview Experience for Software Engineering Intern
Recently Microsoft visited our college to select candidates for the roles of Summer Intern in July 2023. The entire process was virtual and was conducted in 2 rounds mainly. Coding RoundWe had to solve 2 questions within 110 minutes. The first question was from binary search on answer and the second one was from recursion. The questions were the sa
3 min read
Tech Solutions Inc. Interview Experience for Software Engineering Intern
Interview Date: July 15, 2023Location: new york town, the big applePre Interview preparations Earlier than the interview, I spent a large amount of time gaining knowledge of Tech Solutions Inc. I delved into their merchandise, current initiatives, and corporation tradition. I additionally brushed up on my technical abilities, reviewed coding ideas,
4 min read
Dell Technologies Interview Experience for Software Engineering Intern
Applying for a Graduate Intern position at Dell Technologies was a unique and insightful experience. The selection process involved four rigorous rounds, each designed to assess different aspects of the candidates' skills and compatibility with the role. Round 1: Resume ShortlistingCriteria: Emphasis on academic performance, relevant projects, and
3 min read
VISA Interview Experience Software Engineering Intern
It was an On-Campus opportunity for (CSE, ECE, EEE), (CSE), and MCA. The whole process took place online. There were only two rounds: Online AssessmentInterview Round1. Online Assessment: The Online Assessment contained two coding questions: one was a Leetcode medium-level question, and the other was a Leetcode hard-level question. I
3 min read
TCS Work Experience as Software Engineering Intern
My internship experience as a software engineer at Tata Consultancy Services (TCS) was a pivotal chapter in my professional development. This article encapsulates my journey, highlighting the nature of my work, key responsibilities, valuable learning experiences, and a balanced perspective on the pros and cons of working at TCS. Company and Profile
3 min read
Bharat Intern Work Experience as an Intern
Bharat Intern is a tech company offering students internships in various domains. Duration: 1 month Domains Offered: Web development BasicAndroid Apps developmentFull Stack Web developmentMachine LearningData ScienceExperience: I was eager to start an internship during my fourth semester so that I could put my knowledge and experience to work in or
1 min read
Practice Tags :