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

SDE - 1

PayPal
upvote
share-icon
4 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 9 months
Topics: Java, Data Structures, OOPS, System Design, Algorithms, MySQL, Unix,
Tip
Tip

Tip 1 : Practice Data structures as much as possible at least try to solve 4-5 problems every day. Take any one platform and practice regularily
Tip 2 : Create 3-4 Descent projects. It's good to have some different and unique projects that solve any current problem. Everyone came with some famous clones instead of that take unique problem. 
Tip 3 : Along with DSA and project also focus on System design concepts and problems.

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

Tip 1 : Add a clickable profile link of any coding platform
Tip 2 : Add clickable hosted links to each project.
Tip 3 : Do not add irrelevant projects, or achievements to the job role or job stream.

Interview rounds

01
Round
Easy
Online Coding Interview
Duration120 minutes
Interview date29 Dec 2021
Coding problem2

1. Beautiful Number

Moderate
25m average time
70% success
0/80
Asked in companies
PayPalGrowwD.E.Shaw

Ninja loves beautiful numbers and also has two integers, ‘L’ and ‘R’, denoting an interval [L, R].

Given the interval [L, R], Ninja wants you to find the number of Beautiful numbers in the interval.

A Beautiful Number is a number that:

Becomes 1 by repeatedly replacing the number with the sum of squares of its digits.

If the number does not become 1, then it’s not a Beautiful Number.

For example, given interval = [1, 3]

We see that 1 is a Beautiful Number but 2,3 are not. Hence the answer is 1.

Output the single integer, the sum of all Beautiful Numbers in the given range.

Example:
Input: ‘L’ = ‘1’ ,  'R' = ‘3’

Output: 1

As ‘1’ is the only Beautiful Number.

3 is not Beautiful as, 
3 -> 9
9 -> 81
81 -> 65
65 -> 61 … and so on
It can be shown that we cannot get 1. 
Problem approach

import java.io.*;

import java.nio.Buffer;

import java.util.*;





public class TestClass {

public static void main(String[] args) throws IOException {

long preProsArr[] = preprocess();

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

PrintWriter wr = new PrintWriter(System.out);

int T = Integer.parseInt(br.readLine().trim());

for(int t_i = 0; t_i < T; t_i++)

{

String[] str = br.readLine().split(" ");

int l = Integer.parseInt(str[0]);

int r = Integer.parseInt(str[1]);

wr.write(preProsArr[r] - preProsArr[l - 1] + "\n");

}

wr.close();

br.close();

}




static boolean check(int u){

int cnt = 40;

while(cnt > 0 && u != 4){

int ans = 0;

while(u > 0){

ans += (u % 10) * (u % 10);

u /= 10;

}

u = ans;

cnt--;

if(u == 1) {

return true;

}

}

return false;

}




static long[] preprocess() {

long preProsArr[] = new long[1000005];

for(int i = 1; i <= 1000000; i++){

if(check(i)){

preProsArr[i] = i;

}

}

for(int i = 1; i <= 1000000; i++){

preProsArr[i] += preProsArr[i-1];

}

return preProsArr;

}

}

Try solving now

2. Max tasks in the given Budget

Moderate
30m average time
55% success
0/80
Asked in company
PayPal

You are given a straight line starting at 0 to 10^9. You start at zero, and there are ‘N’ tasks you can perform. ‘ith’ task is located at point 'Task[i][0]' in the line and requires 'Task[i][1]' time to be performed.

To perform the task, you need to reach the point 'Task[i][0]' and spend 'Task[i][1]' time at that location. e.g. (5,8) lies at five, so travel distance is five, and work effort is 8.

It takes one second to travel one unit of the path.

Now, we are given a total of ‘totalTime’ seconds, and we need to complete as many tasks as possible and reach back to starting position.

Find the max number of tasks that you can finish in ‘totalTime’.

For example:

3 tasks and 16 units of total time.
Task = [( 2, 8 ) , ( 4, 5) , ( 5, 1)]
( 2, 8 ) -> task 1 at position 2 in line and takes 8 sec to complete.
( 4, 5)  -> task 2 at position 4 in line and takes 5 sec to complete.
( 5, 1) -> task 3 at position 5 in line and takes 1 sec to complete.
Skipping the first task leaves us enough time to complete the other two tasks. Going to the location of the third task and coming back costs 2x5 =10 sec, and performing tasks at locations 4 and 5 cost us 5+1 = 6 sec. 
Total time spent will be 10+6=16 sec.
Try solving now
02
Round
Medium
Face to Face
Duration60 minutes
Interview date23 Jan 2022
Coding problem2

1. Remove Duplicates

Easy
15m average time
80% success
0/40
Asked in companies
GE (General Electric)AmazonCIS - Cyber Infrastructure

Ninja is playing with numbers but hates when he gets duplicate numbers. Ninja is provided an array, and he wants to remove all duplicate elements and return the array, but he has to maintain the order in which the elements were supplied to him.

Problem approach

Iterate over each row and column for each iteration of row and column Take one set and keep on adding elements to set. Before adding to set check whether that element is already present in set or not. if element is present in set then duplicate is found so it is not follwing rules so return false. and at the end return true as no duplicate is found.

Try solving now

2. Best Time to Buy and Sell

Moderate
20m average time
80% success
0/80
Asked in companies
HCL TechnologiesGoldman SachsMakeMyTrip

You are given an array(PRICES) of stock prices for N consecutive days. Your task is to find the maximum profit that you can make by completing as many transactions as you like, where a transaction denotes buying one and selling one share of the stock.

Note:

You must sell the stock before you buy it again.
Problem approach

// Java program for the above approach
import java.io.*;

class GFG
{

static int maxProfit(int prices[], int size)
{

// maxProfit adds up the difference between
// adjacent elements if they are in increasing order
int maxProfit = 0;

// The loop starts from 1
// as its comparing with the previous
for (int i = 1; i < size; i++)
if (prices[i] > prices[i - 1])
maxProfit += prices[i] - prices[i - 1];
return maxProfit;
}

// Driver code
public static void main(String[] args)
{

// stock prices on consecutive days
int price[] = { 100, 180, 260, 310, 40, 535, 695 };
int n = price.length;

// function call
System.out.println(maxProfit(price, n));
}
}

Try solving now
03
Round
Easy
Face to Face
Duration60 Minutes
Interview date29 Jan 2022
Coding problem1

The interviewer was a very nice guy and he continuously gave me hints to get the correct answers from me.

1. Number Pattern

Easy
0/40
Asked in companies
PayPalHexaview TechJosh Technology Group

Pattern for N = 4

The dots represent spaces.



Problem approach

To solve this problem, divide problem in 2 parts, first outer square box diagonals of it. so we can iterate like 2d array of N*N size and print star if it is edge point or digonal point.

Try solving now
04
Round
Easy
HR Round
Duration30 minutes
Interview date2 Feb 2022
Coding problem1

The interviewer was of descent type. He was testing overall personality.

1. Basic HR Questions

  • Why should we hire you?
  • What do you think makes you special in comparison with others?
  • Tell me about your previous experiences.
Problem approach

Tip 1 : Prepare well with a type of behavioral question. These are the common questions that are asked in HR interviews.
Tip 2 : Show the interviewer that you are ready to learn new technologies and you are a quick learner.
Tip 3 : Answer only what the interviewer wants to listen from you. do not mention any previous conflicts you had in the previous organisation.

Here's your problem of the day

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

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
4 rounds | 6 problems
Interviewed by PayPal
4912 views
1 comments
0 upvotes
company logo
SDE - 1
4 rounds | 4 problems
Interviewed by PayPal
1833 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 4 problems
Interviewed by PayPal
1709 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 6 problems
Interviewed by PayPal
2783 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
115097 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58238 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35147 views
7 comments
0 upvotes