I interviewed with Paypal about 2 weeks back for the role for Backend Engineer II. I applied through refferal and received a call for interview within 2-3 days.
Round 1 : DS-Algo Round (1 hour)
Question 1 : Given a map as parameter return a Json String from it, map can have different data types (e.g., String, Number, Boolean, Map, List, etc.)
So if you think this question is starighforward then think again, you cant use any standard library or tools (like Jackson) you need to code it up.
Expectation : Workable, modular code. Should output Json String with proper Indentation.
Fortunately for me I had already seen the code in my company's code base where recursion and instanceOf methods were being used to construct the Json String, this is exactly what the interviewer was looking for, once I mentioned this he sounded very happy, was able to code it in 35 mins.
Question 2 : Variation of Kadane's Algorithm, straightforward question. Was able to solve it.
Interviewer was happy, cleared Round 1.
Round 2 : (DS Algo, Design and Theory) (1 hour)
The interviewer came in hot and unprepared, he started off with asking a question which had no explanation whatsoever. From what I can remember, the question was something like this
Question 1 : Given an array representing pile of boxes [4,5,30,11,6] and h = 8, find the optimal pile splitcc. so that packing gets done in 'h' number of hours.
Output : 4
[30,11,23,4,20], h=5
Output : 30
There was no explanation provided as to how is the output being reached, so the question language was so ambiguous that even after reading it 3-4 times I couldn’t understand it. So I mentioned it to him that the question is not clear to me and I said this couple of times, that I am not getting the question, I am not getting the question.
This pissed him off and I knew I am done here, he said please read line no 3 again. After some back and forth discussion I was getting no where, he was not ready to help at all.
I spent around 25 mins straching my head when it occured to me that this seems a binary search problem where you have to find the optimal size of pile which can should complete the packing in 'h' hours the left would be min(arr) and right would be max(arr) then we apply binary search on this spread.
I eventually coded it up but deep down I knew I was finished it this round.
Then he asked me about "Caching" and I gave definition for it and mentioned "Read through cache, Write Through Cache", which he was quick to notice and asked me difference b/w the two.
I couldn’t give a compreshensive answer.
Next he asked me how do you "what is auto scaling and how do you Auto scale a service" ??
He wanted the way kubernetes does it or they way it is done in production envs.
Haven’t heard back from HR.
Verdict : Rejected
Takeaway : Ask clarifying questions, dont piss off interviewer, some can be difficult but maintain your cool. Also never let something come out of your mouth that you know can be asked as a follow-up question and you are not 100% sure about it.
Hope this helps !! Cheers