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

SDE - 1

PayPal
upvote
share-icon
2 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: Data Structures, Computer Network, DevOps, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1 : Do 500 good quality questions
Tip 2 : Have some decent project in your resume

Application process
Where: Campus
Eligibility: Above 6 CGPA
Resume Tip
Resume tip

Tip 1 : Have some projects on resume.
Tip 2 : Do not put false things on resume.

Interview rounds

01
Round
Easy
Video Call
Duration45 minutes
Interview date7 Nov 2022
Coding problem2

1. Find K Closest Elements

Moderate
15m average time
85% success
0/80
Asked in companies
AmazonMorgan StanleyOptum

You are given a sorted array 'A' of length 'N', two integers 'K' and 'X'. Your task is to print 'K' integers closest to 'X', if two integers are at the same distance return the smaller one.

The output should also be in sorted order

Note:
An integer 'a' is closer to 'X' than an integer 'b' if: 
|a - X| < |b - X|  or (  |a - X| == |b - X| and a < b )
For Example:
if X = 4,  3 is closer to 'X' than 9, as |3-4| < |9-4|  i.e., 1 < 5   and if X = 4, 2 and 6 are equally close to it, as |2-4| == |6-4| = 2, but we say 2 is closer to 4 than 6, as 2 is smaller.
Problem approach

You are given a sorted array 'A' of length 'N', two integers 'K' and 'X'. Your task is to print 'K' integers closest to 'X', if two integers are at the same distance return the smaller one.
The output should also be in sorted order
Note:
An integer 'a' is closer to 'X' than an integer 'b' if: 
|a - X| < |b - X| or ( |a - X| == |b - X| and a < b )
For Example:
if X = 4, 3 is closer to 'X' than 9, as |3-4| < |9-4| i.e., 1 < 5 and if X = 4, 2 and 6 are equally close to it, as |2-4| == |6-4| = 2, but we say 2 is closer to 4 than 6, as 2 is smaller.

Try solving now

2. Search In The Array

Easy
15m average time
85% success
0/40
Asked in companies
Goldman SachsHCL TechnologiesOYO

You are given two arrays ‘arr’ of size ‘n’ and ‘queries’ of size ‘q’. For each element ‘q’ in the array 'queries', your task is to find the sum of all elements in the array ‘arr’ which are less than or equal to ‘q’.

For example: given array ‘arr = { 1, 2, 3, 3, 4, 5, 6, 7, 9, 10}’ and ‘ queries= { 3, 5}’
Then the sum of all elements whose value is less than or equal to
‘queries[0] = 3’ is ‘ 1+2+3+3 =9’.
‘queries[1] = 5’ is ‘1+2+3+3+4+5 =18’.

You have to return the answer of every query { 9, 18}.

Problem approach

You are given two arrays ‘arr’ of size ‘n’ and ‘queries’ of size ‘q’. For each element ‘q’ in the array 'queries', your task is to find the sum of all elements in the array ‘arr’ which are less than or equal to ‘q’.
For Example: Given Array ‘Arr = { 1, 2, 3, 3, 4, 5, 6, 7, 9, 10}’ And ‘ Queries= { 3, 5}’
Then The Sum Of All Elements Whose Value Is Less Than Or Equal To
‘Queries[0] = 3’ Is ‘ 1+2+3+3 =9’.
‘Queries[1] = 5’ Is ‘1+2+3+3+4+5 =18’.
You have to return the answer of every query { 9, 18}.

Try solving now
02
Round
Easy
Video Call
Duration45 minutes
Interview date7 Nov 2022
Coding problem2

1. Reverse Only Letters

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

You are given a string, ‘S’. You need to reverse the string where characters that are not an alphabet stay in the same place, and the rest reverse their positions.

Eg: “a-bcd” becomes “d-cba”

Problem approach

1) I used the 2 pointer approach to solve this. 
2) Start a pointer at start and another at end. If the char at i or j is special char, move one step further, if not then swap the chars at i and j and repeat the same process.

Try solving now

2. Database Questions

What is a checkpoint in DBMS?

Problem approach

The Checkpoint is a type of mechanism where all the previous logs are removed from the system and permanently stored in the storage disk.

There are two ways which can help the DBMS in recovering and maintaining the ACID properties, and they are- maintaining the log of each transaction and maintaining shadow pages. So, when it comes to log based recovery system, checkpoints come into existence. Checkpoints are those points to which the database engine can recover after a crash as a specified minimal point from where the transaction log record can be used to recover all the committed data up to the point of the crash.

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