How to crack SDE-2 interview at Paypal!
After 2 years of working in Zoho Corp., I got a sweet interview invite from Paypal. This is my interview experience with PayPal.
As I already prepared and practiced well on data structures and algorithms related questions, I just brushed up the concepts before the event.
Round 1:
This was a face-to-face round with one of the senior developers from Paypal. He was friendly and enquired about me before the process. He made sure to make me comfortable. Then started asking the following questions.
- Graph Algorithms — Prims and Kruskals
Gave him an abstract idea of both and told the difference. Thought he would ask me to code both, but we just discussed about it and moved on to next. - Sum of two singly Linked lists — Given two linked list with each representing a number and asked to output a new linked list which holds the sum of two numbers. He asked me to write the code in an online compiler and execute it.
Provided a O(n) stack solution for this question and executed it. He was convinced and then went to ask few questions about time and space complexities for a while. - Heap sort
He asked to analyse and explain heap sort with time and space complexities. We fully traced the algorithm. As it was one of my favourite algorithms, was able to give a quick solution. - Problem related to isomorphic strings.
Was asked to code in an online compiler and execute. Requested him to rephrase the question and asked my doubts on inputs. He was patient enough to explain it well again. Then I gave a O(n) hashmap solution and he was satisfied. - Difference between recursion and backtracking.
He expected me to tell the slight difference between the two. I was able to tell it.
For Ref: https://stackoverflow.com/questions/26670757/difference-between-backtracking-and-recursion/26671095 - Internal working of a hashmap
Explained it using Array of linked list concepts. Also collision cases when putting values in hash map were also asked. - Singleton Pattern with example scenarios were asked. Gave few simple ones. He was convinced.
- Atlast, a puzzle was asked. I was tired as it had already been two hours since the interview started. Couldn’t give the best solution in this round. Tried to give an almost good solution and he was satisfied.
https://en.wikipedia.org/wiki/Wolf,_goat_and_cabbage_problem#:~:text=On%20his%20way%20home%2C%20the,goat%20would%20eat%20the%20cabbage.
Round 2:
After 3 days, I was informed that I passed round one and the next round was scheduled. This was another face to face round with one of the managers from Paypal. In this round, design related questions were given more importance. Here are the questions asked.
- Asked about the database architecture which I was working in my previous company. As it was a relational DB, questions were based on sql, table joins, etc..
2. Asked to design an inventory management system.
Clarified the inputs with the interviewer before proceeding to the solution. Gave an abstract design and grew it to accommodate use cases. Used indexing concepts to fetch data in a short time. The discussion regarding this design question went for around 1 hour. We discussing concepts like indexing, sharding, pagination, etc. Had given wrong solutions for some questions in this round. The interviewer was kind enough to explain why it’s wrong and not advisable.
3. A dynamic programming question.
Don’t remember the problem statement exactly. It was a tweaked version of Fibonacci series. Gave a solution in top-down approach with memoization. He was convinced.
Round 3:
This was a managerial round which lasted upto two hours again. Both technical and behavioural questions were asked.
- A stream of strings from newspaper is coming and we have to find all unique strings and their count simultaneously.
Suggested a trie solution for this question. Then the same question was improvised. Gave a solution for that by adding parameters in each trie nodes. The interviewer was convinced. - Asked about my work culture, the hardest problems I’ve faced in my previous job, etc. Able to give an articulated answer for these question as I’ve seen such question in many blogs and mentally prepared answers for those too.
- Asked about the technologies used in my previous company. The interviewer dived deep in ajax, web-services, Rest API’s and caches. I was able to answer it because I’ve already worked in all these techs.
Round 4(HR Round):
After a week, I was notified that I got positive feedbacks from all three rounds and HR round was scheduled. I don’t think they were planning to reject in this round. Few basic HR questions were asked.
Then bang, one night, got the mail that I was offered the role. On the whole, the interview process was well organised.
Here are some tips before interviewing in any tier-1 company.
- Practice enough problems in data-structures and algorithms. Leetcode — Discussions page is a gold mine, you can utilise it well. Different way of solving a problem can be analysed well from there. It’ll be helpful in approaching other problems as well.
- Stick to any one programming language. Better to pick Java or C++ because most of the interviewers know these well. If other languages are used, we may not able to convey our thinking pattern well in the interview.
- Do competitive coding only if you like it. Never do it to get placed in FAANGM or other tier 1 companies. Only practicing data structures, algorithm and system design will be sufficient for getting an offer from these companies.
- Think loudly during the interview. By doing this, our thinking pattern will be clear to the interviewers. So, they can give hints accordingly. Also our communication/socialising skills will be known to them which most of the companies consider vital.
Thanks for scrolling through. Hope you found the article useful.