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

SDE - 1

PayPal
upvote
share-icon
4 rounds | 10 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: Campus
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
Medium
Online Coding Interview
Duration90 minutes
Interview date11 Aug 2017
Coding problem2

It was conducted in Hacker rank which consisted of 10 aptitude questions that included C, C++, Java MCQ. 2 programming questions were also given.

1. Minimum Cost Path

Moderate
25m average time
70% success
0/80
Asked in companies
HSBCHCL TechnologiesHCL Technologies

You have been given a matrix of ‘N’ rows and ‘M’ columns filled up with integers. Find the minimum sum that can be obtained from a path which from cell (x,y) and ends at the top left corner (1,1).

From any cell in a row, we can move to the right, down or the down right diagonal cell. So from a particular cell (row, col), we can move to the following three cells:

Down: (row+1,col)
Right: (row, col+1)
Down right diagonal: (row+1, col+1)
Problem approach

Dijkstra's algorithm can be used to solve this problem as we need to find the shortest path between source and destination. Each cell of grid represents a vertex and neighbor cells adjacent vertices. 
Dijkstra's algorithm :It 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

2. Balanced Parentheses

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

Given an integer ‘N’ representing the number of pairs of parentheses, Find all the possible combinations of balanced parentheses with the given number of pairs of parentheses.

Note :

Conditions for valid parentheses:
1. All open brackets must be closed by the closing brackets.

2. Open brackets must be closed in the correct order.

For Example :

()()()() is a valid parentheses.
)()()( is not a valid parentheses.
Problem approach

A stack can be used to solve this question. 
We traverse the given string s and if we:
1. see open bracket we put it to stack
2. see closed bracket, then it must be equal to bracket in the top of our stack, so we check it and if it is true, we remove this pair of brackets.
3. In the end, if and only if we have empty stack, we have valid string.
Complexity: time complexity is O(n): we put and pop each element of string from our stack only once. Space complexity is O(n).

Try solving now
02
Round
Medium
Face to Face
Duration60 minutes
Interview date14 Aug 2017
Coding problem4

Technical round with questions based on data structures, oops and networking.

1. Count characters

Easy
0/40
Asked in companies
Info Edge India (Naukri.com)PayPalErnst & Young (EY)

Write a program to count and print the total number of characters (lowercase english alphabets only), digits (0 to 9) and white spaces (single space, tab i.e. '\t' and newline i.e. '\n') entered till '$'.

That is, input will be a stream of characters and you need to consider all the characters which are entered till '$'.

Problem approach

Use the inbuilt functions to read a file. 
For each line, store the number of characters and the number of words in each line. 
At last, return the number of the words of the line with the largest number of characters.

Try solving now

2. K Largest Element

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

You are given an unsorted array containing ‘N’ integers. You need to find ‘K’ largest elements from the given array. Also, you need to return the elements in non-decreasing order.

Problem approach

To solve the question using a max heap, make a max heap of all the elements of the list. Run a loop for k-1 times and remove the top element of the heap. After running the loop, the element at top will be the kth largest element, return that. Time Complexity : O(n + klogn)
The question can also be solved using a min heap. 
Approach:
1. Create a min heap class with a capacity of k
2. When the heap reaches capacity eject the minimum number. 
3. Loop over the array and add each number to the heap. 
4. At the end, the largest k number of elements will be left in the heap, the smallest of them being at the top of the heap, which is the kth largest number
The time complexity for this solution is O(N logK).

Try solving now

3. Networking Question

He asked me how I will check whether I have internet connection in my system?

Problem approach

A ping network test transmits data packets to a specific IP address and either confirms or denies there is connectivity between IP-networked devices. So, ping www.google.com will respond.

4. Networking Question

What happens when you type a URL in the web browser?

Problem approach

A URL could contain a request for HTML, an image file, or something else entirely.
1. If the content of the inputted URL is fresh and in the cache, then show it.
2.Otherwise, locate the domain's IP address so that a TCP connection can be established. A DNS lookup is performed by the browser.
3. A browser must know the IP address of a URL in order to establish a TCP connection. This is why a browser need DNS. The browser checks for URL-IP mapping cache in the browser first, then in the OS cache. It conducts a recursive query to the local DNS server if all caches are empty. The IP address is provided by the local DNS server.
4. A three-way handshake is used by the browser to establish a TCP connection.
5.A HTTP request is sent by the browser.
6.A web server, such as Apache or IIS, is operating on the server, which receives incoming HTTP requests and responds with an HTTP response.
7.Browser receives the HTTP response and renders the content.

03
Round
Medium
Face to Face
Duration60 minutes
Interview date14 Aug 2017
Coding problem3

Technical round with questions based on data structures, oops and networking.

1. Counting Sort

Easy
0/40
Asked in companies
Morgan StanleySamsungPayPal

Ninja is studying sorting algorithms. He has studied all comparison-based sorting algorithms and now decided to learn sorting algorithms that do not require comparisons.

He was learning counting sort, but he is facing some problems. Can you help Ninja implement the counting sort?

For example:
You are given ‘ARR’ = {-2, 1, 2, -1, 0}. The sorted array will be {-2, -1, 0, 1, 2}.
Problem approach

Radix sort is a sorting method that groups the individual digits of the same place value before sorting the components. After that, arrange the components in ascending/descending order. Radix sort is a sorting method that groups the individual digits of the same place value before sorting the components. After that, arrange the components in ascending/descending order.
Algorithm :
radixSort(array)
d <- maximum number of digits in the largest element
create d buckets of size 0-9
for i <- 0 to d
sort the elements according to ith place digits using countingSort

countingSort(array, d)
max <- find largest element among dth place elements
initialize count array with all zeros
for j <- 0 to size
find the total count of each unique digit in dth place of elements and
store the count at jth index in count array
for i <- 1 to max
find the cumulative sum and store it in count array itself
for j <- size down to 1
restore the elements to array
decrease count of each element restored by 1

Try solving now

2. Technical Question

When you search for a particular product in amazon, it displays some of the search results. But, only few particular products which are available in amazon are displayed, not all. How does this happen?

Problem approach

I told Machine Learning.
Follow up questions :
1.What data structure do they use? Hash tables.
2.What will be the key and what will be the values? The product will be the key. The brands will be the values.

3. Technical Question

Applications of Fibonacci series in real life

Problem approach

Few real life examples are :
Flower petals. The number of petals in a flower consistently follows the Fibonacci sequence. .
Seed heads. The head of a flower is also subject to Fibonaccian processes. .
Spiral galaxies. 
Tree branches. 
Shells.

04
Round
Easy
HR Round
Duration30 minutes
Interview date14 Aug 2017
Coding problem1

HR round where the interviewer asked questions to know more about me.

1. Basic HR Questions

1. Discussion about my projects.
2. If you don’t get selected for PayPal, what will you do?

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
SDE - 1
4 rounds | 6 problems
Interviewed by PayPal
4841 views
1 comments
0 upvotes
company logo
SDE - 1
4 rounds | 4 problems
Interviewed by PayPal
1789 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by PayPal
1683 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 6 problems
Interviewed by PayPal
2716 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
114579 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
57824 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34961 views
7 comments
0 upvotes