Round 0 : Online Test on Codility (90 minutes)
Pretty simple. Didnt remember though.
I was able to code both in 40 minutes
Round 1 :
Q1. Design a stack such that maximum frequency element is popped out from it. Constraint : Do not regres the time complexity of the stack.
Interviewer extended the question to multithreaded approach.
Q2. We have an array of integers , nums and an array of requests where requests[i] = [starti , endi] . The ith request asks for the sum of nums[starti] +
nums[starti + 1] + ..... +[nums[endi - 1] + nums[endi]. Both starti and endi are 0-indexed.
Return the maximum total sum of all requests among all permutation of nums.
Input : nums = [1,2,3,4,5] requests = [[1,3] , [0,1]]
Expectations : Full Working Code.
Round 2:
Given N list of employees and their list of free time, return the list of time when they can meet.
Just this statement was given by interviewer. he didnt wrote the problem statement.
His expectation was to infer the problem , come with the inputs of function , algo and then the output.
For ex in case of 2 employess, empl1 is free form (1 pm to 1:30 pm) , (4 pm to 4:30 pm), (6 pm to 6:30 pm)
empl2 is free form (2 pm to 2:30 pm) , (4:15 pm to 4:30 pm) (6 pm to 6:30 pm)
Ans is return a list (4:15 pm to 4:30 pm) , (6 pm to 6:30 pm)
Gave the solution for this. Then he extended the question to : Return a list when atleast N - X are free ( X can vary from 1 to N )
Best interviewer.
Round 3 : Given N connected devices which are connected to cloud storage like dropbox and if any file is copied in one of device eg. file.txt is copied to file1.txt.
We need to devise a mechanism so that other devise dont download file1.txt from the cloud storage.
It was just like Dropbox Design. I explained in terms of chunking and hashing mechanism.
He then extended the question how about creating file2.txt from file.txt by just putting any character.
Deep discussion on the concept and approaches. overall it went fine and interviewer was too supportive.
Round 4: Deep dive into the project.
Vague statement : Design a Logger Application.
He just gave the above statement. he didnt specify whether he was expecting HLD or LLD. I gave basic HLD and then wrote the classes(Low Level) but he seems to be not statisfied.
He told how can we modify the code for Distributed Logging. i explained about distributed logging like datadog but he was interested in modifying my current implementation so that it supports distributed logging.
Interviewer was this round was very adamant and was not supportive. Even his problem statements / expectations were not clear.
Its difficult to code in last 5 minutes for distributed logging.
Rejected after 4th round!!!!