I interviewed with PayPal about two weeks ago for the role of Backend Engineer II. I applied through a referral and received a call for an interview within two to three days.
Round 1: DS-Algo Round (1 hour) Question 1: Given a map as a parameter, return a JSON String from it. The map can have different data types (e.g., String, Number, Boolean, Map, List, etc.). So if you think this question is straightforward, then think again. You cannot 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. I was able to code it in 35 minutes.
Question 2: Variation of Kadane's Algorithm, straightforward question. I was able to solve it. The interviewer was happy, and I cleared Round 1.
Round 2: (DS Algo, Design and Theory) (1 hour) The interviewer came in hot and unprepared. He started off by 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 a pile of boxes [4,5,30,11,6] and h = 8, find the optimal pile split 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 the output was being reached. The question language was so ambiguous that even after reading it three to four times, I couldn't understand it. So I mentioned it to him that the question was not clear to me, and I said this a couple of times. I was not getting the question. This pissed him off, and I knew I was done here. He said, "Please read line number 3 again." After some back and forth discussion, I was getting nowhere. He was not ready to help at all. I spent around 25 minutes scratching my head when it occurred to me that this seems like a binary search problem where you have to find the optimal size of the pile that should complete the packing in 'h' hours. The left would be min(arr) and the 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 in this round. Then he asked me about "Caching." I gave the definition for it and mentioned "Read through cache, Write Through Cache." He was quick to notice and asked me the difference between the two. I couldn't give a comprehensive answer.
Next, he asked me, "What is auto scaling and how do you auto scale a service?" He wanted the way Kubernetes does it or the way it is done in production environments.
I haven't heard back from HR.
Verdict: Rejected
Takeaway: Ask clarifying questions, don't piss off the interviewer. Some interviewers 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.