Google | Phone Screen | Validate Formula & Max Path in N-ary Tree [Waiting]
Anonymous User
1518

Position: Intern

Hello Guys,

I want to share my recent interview experience with Google. The recruiter contacted me with online coding challenge which was easy and then a couple of days later, reached out to schedule a back-to-back 2x45 minute phone interview.


Phone Interview 1:

The first round was kind of okay. We are given a string which is a mathematical formula as input to our function. We need to check if it is a valid formula. If no, return 'not possible'. If yes, return the solution of the mathematical formula.


Phone Interview 2:

It was kind of hard since I was not very well prepared with Graph-type problems and it showed in the interview.

The question was we are given a dictionary of cities which states the distances between them as a tuple. We need to find the maximum possible distance in that.

We were also given a tree figure representing this to understand.

Example:

Input = {"A" : [("B", 2), ("C", 1)], "B" : [("D", 3)], "C" : [("E", 1), ("F", 2), ("G", 5)]}

Output: 6
Explanation: In the above example, the maximum possible distance is 6 since A -> C -> G is the maximum distance.

I felt the experience was good and the intervieweres were helpful whenever I was stuck. If I had done bit more prep in graph area of DSA, I could have done a lot better. Anyways, since this is my first time, it is okay and better luck to others trying for Google!

And if anyone has any idea for solving the 2nd question in a quick/simple way, please comment below :D

Comments (7)