1st google phone interview
- Search in Rotated Sorted Array https://leetcode.com/problems/search-in-rotated-sorted-array/description/
I was not able to solve this question completely. I was able to form the solution but made some minor mistakes while coding it. The interviewer was helpful and gave good hints.
They are very strict on their 45 mins interview timeline so try to speed up through your solution. Aim to solve 2 questions in 45 mins.
They scheduled another phone screen based on my first phone screen feedback.
2nd google phone interview
- Design stack to have push(i) pop() and max() functions using basic data structures. These functions should have O(1) time complexity https://leetcode.com/problems/max-stack/description/
- You are given an array of integers that does not contain any duplicates. A is less than A[n-1]. The array is initially sorted in descending then ascending and then descending order. Find the largest element in such array. For example, 10, 8, 6, 5, 4, 3,130000, 20, 19, 18, 13……
Here, first part of the array is sorted in descending order. Then the order changes at 3 to asceding. The order changes back to desceding after 130000.
This is a binary search problem where we need to eleminate the normal descending portions of the array and get the first element of the 2nd descending portion.
This inteviewer was very silent throughout the interview. He did not challenge the solution or asked any follow up questions. He gave hints when I struggled in the beginnig on the 2nd question. I was able to solve these two questions in given time. I am now waiting for the feedback for my 2nd interview.
Prepare for leetcode easy-medium questions for Google’s phone interview. My recruiter is very responsive. The scheduling process has been very smooth.