PayPal interview experience Real time questions & tips from candidates to crack your interview

Software Engineer

PayPal
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: Data Structures, Algorithms, System Design, Aptitude, OOPS
Tip
Tip

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application process
Where: Other
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Interview rounds

01
Round
Easy
Face to Face
Duration60 minutes
Interview date14 Dec 2015
Coding problem2

Technical Interview round where the interviewer asked questions based on Data structures and algorithms.

1. Reverse Linked List

Easy
15m average time
85% success
0/40
Asked in companies
SprinklrHSBCLenskart
Note :
You do not need to print anything, just return the head of the reversed linked list. 
Problem approach

This can be solved both: recursively and iteratively.
The recursive approach is more intuitive. First reverse all the nodes after head. Then we need to set head to be the final node in the reversed list. We simply set its next node in the original list (head -> next) to point to it and sets its next to NULL. The recursive approach has a O(N) time complexity and auxiliary space complexity.
For solving the question is constant auxiliary space, iterative approach can be used. We maintain 3 pointers, current, next and previous, abbreviated as cur, n and prev respectively. All the events occur in a chain.
1. Assign prev=NULL, cur=head .
2. Next, repeat the below steps until no node is left to reverse:
1. Initialize n to be the node after cur. i.e. (n=cur->next)
2. Then make cur->next point to prev (next node pointer).
3. Then make prev now point to the cur node.
4. At last move cur also one node ahead to n.
The prev pointer will be the last non null node and hence the answer.

Try solving now

2. Dijkstra's shortest path

Moderate
25m average time
65% success
0/80
Asked in companies
PayPalAmazonPhonePe

You have been given an undirected graph of ‘V’ vertices (labeled 0,1,..., V-1) and ‘E’ edges. Each edge connecting two nodes (‘X’,’Y’) will have a weight denoting the distance between node ‘X’ and node ‘Y’.

Your task is to find the shortest path distance from the source node, which is the node labeled as 0, to all vertices given in the graph.

Example:

Input:
4 5
0 1 5
0 2 8
1 2 9
1 3 2
2 3 6

alt text

In the given input, the number of vertices is 4, and the number of edges is 5.

In the input, following the number of vertices and edges, three numbers are given. The first number denotes node ‘X’, the second number denotes node ‘Y’ and the third number denotes the distance between node ‘X’ and ‘Y’.

As per the input, there is an edge between node 0 and node 1 and the distance between them is 5.

The vertices 0 and 2 have an edge between them and the distance between them is 8.
The vertices 1 and 2 have an edge between them and the distance between them is 9.
The vertices 1 and 3 have an edge between them and the distance between them is 2.
The vertices 2 and 3 have an edge between them and the distance between them is 6.

Note:

1. There are no self-loops(an edge connecting the vertex to itself) in the given graph.

2. There can be parallel edges i.e. two vertices can be directly connected by more than 1 edge.
Problem approach

Dijkstra's Algorithm basically starts at the source node and it analyzes the graph to find the shortest path between that node and all the other nodes in the graph.
The algorithm keeps track of the currently known shortest distance from each node to the source node and it updates these values if it finds a shorter path.
Once the shortest path between the source node and another node is found, that node is marked as "visited" and added to the path. 
The process continues until all the nodes in the graph have been added to the path. This way, we have a path that connects the source node to all other nodes following the shortest path possible to reach each node.
Pseudocode :

function Dijkstra(Graph, source):
2: for each vertex v in Graph: // Initialization
3: dist[v] := infinity // initial distance from source to vertex v is set to infinite
4: previous[v] := undefined // Previous node in optimal path from source
5: dist[source] := 0 // Distance from source to source
6: Q := the set of all nodes in Graph // all nodes in the graph are unoptimized - thus are in Q
7: while Q is not empty: // main loop
8: u := node in Q with smallest dist[ ]
9: remove u from Q
10: for each neighbor v of u: // where v has not yet been removed from Q.
11: alt := dist[u] + dist_between(u, v)
12: if alt < dist[v] // Relax (u,v)
13: dist[v] := alt
14: previous[v] := u
15: return previous[ ]

Try solving now
02
Round
Easy
Face to Face
Duration60 minutes
Interview date14 Dec 2015
Coding problem2

Technical Interview round where the interviewer asked questions based on Data structures and algorithms.

1. Sort Linked List

Easy
15m average time
85% success
0/40
Asked in companies
AdobePayPalFreshworks

You are given a Singly Linked List of integers which is sorted based on absolute value.

You have to sort the Linked List based on actual values.

The absolute value of a real number x, denoted |x|, is the non-negative value of x without regard to its sign.

Example:
If the given list is {1 -> -2 -> 3} (which is sorted on absolute value), the returned list should be {-2 -> 1 -> 3}.
Problem approach

Merge sort can be used to sort a linked list.
We split the given list into two parts, sort the first half, then sort the second half and finally merge this two parts.The following auxiliary functions can be used:
1. getMid(head), which will find the middle of list with given head and cut it into two smaller lists. We use the idea of slow and fast pointers here to find middle efficiently.
2. merge(head1, head2) will merge two lists with given heads.We iterate over two lists, using two pointers and add them one by one. When we out of nodes, we attach the rest of on of the lists to the end, we return the start of our new list.
3. sortList(head): This is the main function. If list has length 0 or 1, it is the base case, so simply return. If it is not the case, we find mid using getMid() function, which will cut our list into two smaller lists and return the start of the second list. Finally, we apply sortList() to head and to mid and merge two parts.
Complexity: Time complexity is O(n log n).
Space complexity is O(log n), because we use recursion which can be log n deep.

Try solving now

2. Kth largest element in the unsorted array

Moderate
10m average time
90% success
0/80
Asked in companies
FacebookUberMicrosoft

You are given an array consisting of 'N' distinct positive integers and a number 'K'. Your task is to find the kth largest element in the array.

Example:
Consider the array {2,1,5,6,3,8} and 'K' = 3, the sorted array will be {8, 6, 5, 3, 2, 1}, and the 3rd largest element will be 5.
Note:
1) Kth largest element in an array is the kth element of the array when sorted in non-increasing order. 

2) All the elements of the array are pairwise distinct.
Problem approach

One simple solution could be to sort the linked list first using merge sort algorithm. And then returning the kth element of the list. 
Time Complexity : O(NlogN)

Try solving now
03
Round
Easy
HR Round
Duration30 minutes
Interview date14 Dec 2015
Coding problem1

HR Round that lasted for around 30 minutes. The interviewer asked questions to know more about me.

1. Basic HR Questions

Q1. Which is my dream company?
Q2. What is my biggest achievement till date?
Q3. How would I handle conflicts with my team members?
Q4. I have saved money from a year and bought my dream bike. It is the last round of Paypal interview today. I am on my way on the bike and it breaks down in a no parking zone. Suggest a win­win situation so that I don’t lose both interview and bike.
Q5. What is success according to me?
Q6. I was asked to write a code snippet from my project.
Q7. How would I explain the concept of prime number to an illiterate?
Q8. Give a few test cases for a bank transaction

Problem approach

Tip 1 : The cross questioning can go intense some time, think before you speak.
Tip 2 : Be open minded and answer whatever you are thinking, in these rounds I feel it is important to have opinion.
Tip 3 : Context of questions can be switched, pay attention to the details. It is okay to ask questions in these round, like what are the projects currently the company is investing, which team you are mentoring. How all is the work environment etc.
Tip 4 : Since everybody in the interview panel is from tech background, here too you can expect some technical questions. No coding in most of the cases but some discussions over the design can surely happen.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
company logo
Software Engineer
4 rounds | 7 problems
Interviewed by PayPal
1416 views
0 comments
0 upvotes
company logo
Software Engineer
3 rounds | 6 problems
Interviewed by PayPal
2425 views
0 comments
0 upvotes
company logo
Software Engineer
3 rounds | 5 problems
Interviewed by PayPal
3719 views
0 comments
0 upvotes
company logo
Software Engineer
3 rounds | 4 problems
Interviewed by PayPal
6366 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer
3 rounds | 7 problems
Interviewed by Optum
7873 views
1 comments
0 upvotes
company logo
Software Engineer
5 rounds | 5 problems
Interviewed by Microsoft
9973 views
1 comments
0 upvotes
company logo
Software Engineer
2 rounds | 4 problems
Interviewed by Amazon
4310 views
1 comments
0 upvotes