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

SDE - 1

PayPal
upvote
share-icon
4 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: Data Structure and Algorithms, Java Basics, OOPS, Binary Tree, DBMS
Tip
Tip

Tip 1 : Practice Tree and DP problems more, generally asked in most interviews
Tip 2 : Clear your concepts and approach more rather than concentrating on number of questions you solved
 

Application process
Where: Referral
Eligibility: No criteria
Resume Tip
Resume tip

Tip 1 : Explain your project properly in points
Tip 2 : Know properly whatever you have written on your resume

Interview rounds

01
Round
Medium
Online Coding Test
Duration90 minutes
Interview date12 Aug 2021
Coding problem2

1. Ninja Land

Ninja
100m average time
20% success
0/200
Asked in companies
PayPalCodenation

In Ninja land, there are N cities that are connected to each other by undirected roads. The cities along with all the roads form a tree-like structure. Each city has an initial height associated with it. The heights of the cities can change also. Now Ninja got bored at home and decided to visit different cities. But Ninja only wants to visit two cities if the path between them forms an alternate series of ups and downs. Since Ninja doesn’t know whether the path between the two cities is alternating or not, he asked you to help him.

For Example:

Suppose Ninja is currently standing at X city and want to visit Y city. Let the heights of all the cities in the path from X to Y(including X and Y) are 10 20 5 30. Now these series of heights forms and alternate series. So Ninja will visit the city Y.

Some examples of alternate series are 15 4 11 8 25, 100 120 50 70 60 but the series like 3 5 4 1, 6 3 10 12 are not alternating.
Now you will be asked q queries, and there are two types of queries:
1 X Y: change the height of city X to Y.

2 X Y: Check whether the path between city X to Y is alternating or not.
Try solving now

2. Minimum Window Substring

Hard
15m average time
85% success
0/120
Asked in companies
PayPalBarclaysUber

You are given two strings ‘A’ and ‘B’. Your task is to return a substring ‘S’ of ‘A’ such that the following conditions hold true :


• You can make ‘B’ from ‘S’ by removing some characters and rearranging some characters zero or more times.

• Length of ‘S’ must be as minimum as possible.


Note :

Testcases are generated such that a substring always exists and is unique.

Example :

A = ninjas, B = sin

All possible substrings with which 'B' can be created are
"ninjas", "injas".

Hence the substring with minimum length is "injas".
Problem approach

I used sliding window and hashmap for this problem

Try solving now
02
Round
Medium
Video Call
Duration60 minutes
Interview date10 Sep 2021
Coding problem2

2 coding questions were there
Approach is discussed along with time and space complexity
Asked to write the pseudo code for both

1. Median of two sorted arrays

Hard
25m average time
65% success
0/120
Asked in companies
GrabAtlassianAmazon

Given two sorted arrays 'a' and 'b' of size 'n' and 'm' respectively.


Find the median of the two sorted arrays.


Median is defined as the middle value of a sorted list of numbers. In case the length of list is even, median is the average of the two middle elements.


The expected time complexity is O(min(logn, logm)), where 'n' and 'm' are the sizes of arrays 'a' and 'b', respectively, and the expected space complexity is O(1).


Example:
Input: 'a' = [2, 4, 6] and 'b' = [1, 3, 5]

Output: 3.5

Explanation: The array after merging 'a' and 'b' will be { 1, 2, 3, 4, 5, 6 }. Here two medians are 3 and 4. So the median will be the average of 3 and 4, which is 3.5.
Problem approach

Approach 1- As the given array is sorted we create a new array and find median
Approach 2 - we need to find out the number of elements to be picked up from first array that will come before the median and number of elements from second array that will come in prefix subarray of the median can be calculated as total elements/2 - no. of selected elements from first array. Also, while calculating median we need the value of two middle elements (in case of even number of elements) or just a single middle element (in case of odd number of elements). So, we will keep the track of these values while performing binary search.

Try solving now

2. Add One To Linked List

Easy
10m average time
90% success
0/40
Asked in companies
UberSamsung R&D InstitutePayPal

Ninja has been given a number that is represented in the form of a linked list such that each digit corresponds to a node. He has been asked to add 1 to it and return the updated list.

For Example:

1234 is represented as (1 -> 2 -> 3 -> 4) and adding 1 to it should change it to (1 -> 2 -> 3 -> 5).

Note:

The input Linked list does not have any trailing zeros.
Problem approach

Approach 1 - Reverse given linked list. Start traversing linked list from leftmost node and add 1 to it. If there is a carry, move to the next node. Keep moving to the next node while there is a carry.
Reverse modified linked list and return head.

Try solving now
03
Round
Medium
Video Call
Duration60 minutes
Interview date11 Oct 2021
Coding problem2

2 coding question were asked
detailed discussion on my internship experience and project in my resume
Some basic java questions were asked

1. Minimum Number Of Moves To Get All Keys

Moderate
25m average time
80% success
0/80
Asked in companies
PhonePeWells FargoPayPal

Some players are put inside an ‘N’ x ‘M’ matrix ‘GRID’ one by one where:

  • ‘.’ represents an empty cell.
  • ‘#’ represents a wall.
  • ‘@’ represents the starting point.
  • Lowercase letters represent keys.
  • Uppercase letters represent locks.

The player to collect all the keys in minimum moves will win the game. The ninja is one of the players and needs your help to win the game. He wants you to find the minimum number of moves to get all the keys. The rules of the game are:

  • You have to start from the starting point and move in one of the four cardinal directions.
  • You cannot walk outside the grid or walk into a wall. You can pick a key whenever you walk over it.
  • You cannot walk over a lock unless you have the corresponding key. For example, the key for the lock ‘A’ is ‘a’.
  • There is exactly one key for each lock.

For Example:

You are given ‘GRID’= [[“@.aA”],[“.B#.”],[“...b”]]. Then the answer will be 5.

Try solving now

2. Distance between two nodes of a Tree

Moderate
25m average time
60% success
0/80
Asked in companies
AmazonOracleIntuit

Given a binary tree and the value of two nodes, find the distance between the given two nodes of the Binary Tree.

Distance between two nodes is defined as the minimum number of edges in the path from one node to another.

Problem approach

We first find the LCA of two nodes. Then we find the distance from LCA to two nodes. 
only approach and time complexity is discussed

Try solving now
04
Round
Easy
HR Round
Duration60 minutes
Interview date20 Nov 2021
Coding problem1

This was hiring manager round
This was complete resume based round

1. Technical Questions

Detailed discussion on the project on which i was working on my previous organisation
Some questions on DBMS like sql or no sql difference, use of indexing.

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
2717 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
57825 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
34961 views
7 comments
0 upvotes