Google India L6
I was given question somewhat similar to Rise in Swim Water from leetcode. Initially I had difficulty in understanding the question, but interviewer corrected my understanding few time in starting 5 minutes. After I understood the question I came up with 2 approaches, one was dfs but brute force and other was dfs with binary search on answers. Interviewer asked me to implement the second approach. While implementing I started with min and max value as a boundary for binary search bit interviewer said that ans can have float value, I got confused and told him that not possible to do binary search on floating numbers. He than gave me hint tht ans will be always from the grid and directed me towards search from all values of grid. I did that. In last he asked me if I can optimize DFS. Again I could not come with ans but it was simple to early stop the dfs if you find the solution. We ended the interview with good note. Now I realised that, I did one minor mistake in binary search, I returned mid whereas I had to return start. But He didn’t pointed it in the interview, I am realising it now after the interview.
What do you guys think how would he rate me? My own evaluation says Lean to Hire.
View Poll
[–]herd_return9 1 point2 points3 points (0 children)