applied directly on the career page, was reached out by a recruiter on linkedin.
Scheduled the screening took 3 weeks time, recruiter did suggest to go for 2 weeks as its a rolling phase for this position. i still insisted for 3 weeks.
was a huge noob at leetcode (had conceptual knowledge from my cs degree though, even which had faded and needed revision). grinded leetcode day and night. never studied this hard in my life. completed 100 problems in 3 weeks on leetcode.
I was asked this question in this round.
https://leetcode.com/discuss/interview-question/5131934/google-screening-question
I came up with an approach to use 2 hashsets, 1 which stores visited integers and the other one which stores the current subarray elements. I dont remember the exact approach coz its been a long time now. but it was a valid solution(n^2) which the interviewer agreed to it too. but he wanted me to go for a linear solution.
i did not type any code for a long time as the discussion was very interesting and was reaching a great conclusion. i still tried suggesting that i would prefer to begin writing the code and i can improve it with time, but he insisted that we finalise the approach first.
he then gave me a hint that i could use class variables to prevent some operations.
i think i got what he meant, so i started typing the solution. although i wasnt able to convey it in words that okay i can utilise your input and achieve a linear time, coz of the time crunch.
i wrote some lines of code which was barely enough to convince anybody reading. it ended very positively despite this.
i received a rejection mail shortly after this.