So I am in interview process for google(L3). My 2 technical rounds and googleyness round are done. But last technical round is getting rescheduled again and again. Like 2 times it was rescheduled and today interviewer didn't join the call.
Is this thing common?
Questions asked in 2 technical rounds.
Round 1:
Given an array of size n and an integer k where k << n. Also for each element, the absolute difference b/w its current position and sorted position is <= k. We have to sort the array.
You are given a tree node (Root) at start. Write two methods
a. addNode(TreeNode *parent, int val) ===> Create a new node and add it to its parent. Parent pointer was given as argument for this function.
b. getRandomNode() ==> Gives a random node from the tree
Follow up: getRandomLeafNode() => Give a random leaf node.
All the methods must be in O(1).
This round went well. Got to know from my POC that got positive feedback for this round.
Round 2
Given an array, any subarray is special if it forms an AP with common difference of 1 or -1. Give sum of all such subarrays.
Ex: arr = [2,3,4,5,6,5]
So ans should be sum of all the good subarrays which are:
[2], [3], [4], [5], [6], [5]
[2,3], [3,4], [4,5], [5,6], [6,5]
[2,3,4], [3,4,5], [4,5,6]
[2,3,4,5], [3,4,5,6]
[2,3,4,5,6]
This round also went very well, was able to solve this question using DP within time.
Also got positive feedback for this round.
Googleyness Round:
It was a standard HR round, most of the questions were related to my current work and challenges I faced while working.
Not sure why they are delaying the last round. Has anyone has faced the same issue?
Round 3:
It was relatively simpler round.
We are given an array of integer, and a number k. We have to find the maximum consequtive occurance of number k in the array.
There were many follow up questions around the same concepts.
After 1 week got a feedback from the recruiter that I have cleared the tech rounds with positive feedback and they are proceeding further with team match.
After around one month I was matched with one of the team. Around after one week recruiter called me that my profile is selected.