 Open in App
Not now

# Google Interview Experience | On-Site for SDE

• Difficulty Level : Hard
• Last Updated : 02 Mar, 2020

So the on-site interview comprised of five rounds in total. 4 technical rounds and 1 googliness round.

Round 1:  There are several equations given in terms of two variables with a ‘<‘ or ‘>’ sign between them. Ex – a > b, b > c etc. You have to answer whether there is a sequence which of the variables which will satisfy all the equations given.

My approach : I solved it as a graph problem. All the variables were converted into the nodes of a graph. An edge between them signified the relation between them. If the directed graph did not contain a cycle, then it was possible to have an answer.

Round 2:  https://www.geeksforgeeks.org/optimal-strategy-for-a-game-dp-31/  It was something like this with a little variation that the total number of moves were limited to a number t.

My approach : I gave a recursive approach and then a dynamic programming solution. The interviewer helped me to get to the final solution which was possible in O(n) time complexity and O(1) space complexity.

Round 3: Suppose you have an array consisting of 0 and 1. Find the total number of subarrays of o.

Ex – array : 00101

Ans : { “0”, “0”, “00”, “0”} – 4

My Approach : First I found the number of subarrays (of 0) in the main array. Ex – 2 in the above example. Then I applied the formula (n+1)(n)/2 on each size of subarray.

Round 4 :  This was a classical dynamic programming problem of palindrome partitioning.

Round 5 : This was a pretty easy round compared to others. General questions were asked like what are the skills that you want in your manager, how should a company play a role in social and environmental development, what are the basic qualities that you look in an employee, how do you work in a team etc.

All in all it was a good experience. Remember to be quick and very precise about your answers. The questions may seem easy but they are actually grading you on your accuracy, efficacy and quickness to respond.

My Personal Notes arrow_drop_up