Panda Guru LogoPanda
Guru

Google | L3 | Bangalore [Offer]

Phone Screen

Questions: Grid question with some constraints. Detailed Question

Candidate's Approach

No approach provided.

Interviewer's Feedback

No feedback provided.


Onsite 1 : DSA

Questions:

You are given a number (very long) and an integer K. Find the largest K-digit number that can be formed from the original number (preserve the order). Example : S = "3582", K=2 Output: "82" Follow up 1: Solve in O(n) time Follow up 2: Solve in O(n) time and O(k) space
Candidate's Approach

Solved using a monotonic stack.

Interviewer's Feedback

No feedback provided.


Onsite 2 : DSA

Questions:

Get all sequences that sum to a particular number if digits 1 & 2 can be used. Example : Sum=4 Result : ["1111", "112", "121", "211", "22"] Follow up 1: What if we are allowed to use first K digits. (1,2,3,...,K)
Candidate's Approach

Recursion / backtracking solution. Note: For the original question, time complexity is not O(2^N) but as it is a fibonacci sequence, complexity is (golden ratio)^n i.e. 1.618^n. Spent a couple of minutes on the time complexity discussion, couldn't come up with 1.68^n but was able to point out the tree pruning.

Interviewer's Feedback

No feedback provided.


Onsite 3 : DSA

Questions:

Given an expression with some variables, operands (+ and -) and parenthesis, return the simplified expression. Example : a-(a-b)-c Output : b-c
Candidate's Approach

Count the variables with map.

Interviewer's Feedback

No feedback provided.


Onsite 4 : Googliness

Questions: Behavioral questions

Candidate's Approach

Had 2 team matches, both successful.

Interviewer's Feedback

No feedback provided.