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

SDE - 1

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

Interview preparation journey

expand-icon
Preparation
Duration: 1 month
Topics: DSA, C++ concept, Design Pattern, OOPS, DP
Tip
Tip

Tip 1 : Speed up your logical thoughts
Tip 2 : Try to write code on notepad without any intelligence from IDE
Tip 3 : Focus on basic questions as well

Application process
Where: Linkedin
Resume Tip
Resume tip

Tip 1 : Focus on DSA in resume
Tip 2 : Mention the skills in which you are comfortable

Interview rounds

01
Round
Medium
Online Coding Interview
Duration45
Interview date22 Oct 2021
Coding problem2

The round started at 8:30 pm and lasted at 9:20
The interview was taken by some guy from google in Munich.

1. Cakes

Easy
15m average time
80% success
0/40
Asked in company
Google inc

You have 'N' cakes of different names. You want to choose exactly 3 cakes out of these 'N' cakes. The name of the ith cake is 'S[i]' (0 <= i < 'N'). The three chosen cakes should follow the following conditions.

The name of the cake should start with 'c', 'a', 'k', 'e', or 's'.
No two cakes should begin with the same letter.

Return the number of ways to choose three cakes irrespective of the order.

Note : Assume 0-based indexing.

For example:
Let 'N' = 4, S = ["choco", "apple", "kesar", "strawberry"].
There exist 4 different ways to choose three cakes following all the required conditions i.e. {"choco", "apple", "kesar"}, {"choco", "apple", "strawberry"}, {"choco", "strawberry", "kesar"}, {"strawberry", "apple", "kesar"}.
Problem approach

Yes, I am able to solve the problem but I have taken much more time than expected.
There is only only one point notice in that problem is that time is bounded and if time is given in minutes than we have at max 1439 minutes .
for exp: 01:01 am is =61 
similarly we can find the minutes conversion .
this will take complexity upto O(n)

Try solving now

2. House Robber

Moderate
35m average time
80% success
0/80
Asked in companies
Park+India TodayGoogle inc

Mr. X. is a professional robber planning to rob houses along a street. Each house has a certain amount of money hidden.

Meanwhile, adjacent houses have a security system connected, and it will automatically contact the police if two neighboring houses were broken into the same night.

You are given an array/list of non-negative integers 'A' representing the amount of money hidden at each house. Your task is to return the maximum amount of money Mr. X can rob tonight without alerting the police.

Example:
Input: [1,2,3,1]

Output: 4

Mr. X. can rob the first house and the third house, total money = 1 + 3.
Hence, the total money robbed by Mr. X. is 4.
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
1574 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