Status: 13 years of IT experience
Position: L5 Software Engineer at Google
Location: Hyderabad, India
Date: Jan 2019
I got a chance to have a telephonic round of interview for the position of Software Engineer at Google Hyderabad location. The recruiter approached me over email and asked to have an introductory call. In introductory call she introduced herself and asked some basic Data Structure and Algorithms questions around Tree, Binary Search and Heap which candidate is supposed to know the answers on finger tip. After this call she sent me lots of documents and links to prepare for next telephonic round. I took 15 days of time to prepare and then appeared for the telephonic round. Interviewer was from Singapore and was looking quite younger to me. This 45 mins round started with 5 mins of introduction.
Then he gave me a problem which I was supposed to code on Google Docs document -
Question 1:
Given two strings A and B, check whether you can create B by using characters of A. Note characters of A can be used any number of times and in any order to make it B. If no such solution, return -1.
I solved this problem using keeping a map of all chars of A and then looping through B to check if there is any char in B which does not belong to the map.
After this, he asked a follow up question
Question 2:
https://leetcode.com/problems/repeated-string-match/
At that time I had no idea about this problem. I took the wrong approach and tried to solve it using Dynamic Programming. I ran through my solution to him using DP approach and whichever sample input we took to test, my solution was giving correct result. However I was not able to prove the correctness of my algorithm theoretically and neither interviewer was able to prove that my algorithm is incorrect. At that point interview got over.
Post Interview:
After couple of days recruiter got back to me and shared the feedback. She explained that 1st question's answer was correct and for 2nd problem, interviewer evaluated my DP approach after the interview and found an input set in which my solution will not work. I was disappointed as if interviewer could have proved me wrong in interview itself I could have thought to fix the algorithm then and there. However overall interview experience was great. I got timely response from Google.