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
Journey
I was unaware of this coding stuff till my school life. I got to know about the field of computer science in my class 11th. I found it interesting and decided that I will pursue my career in the field of computer science. I took admission in B.Tech CSE and learned the various concepts like DSA and all.
Application story
I got to know about this opening through Linkedin post. I applied to the post through a Referral via a friend. After few days, I got a mail about the whole selection process.
Why selected/rejected for the role?
I think I was on point with my coding solutions to the questions asked in the interviews. I provided the optimal solutions and I was giving correct explanations to some theory questions asked.
Preparation
Duration: 2 months
Topics: Data structures, Algorithms, System Design, DBMS, Object-Oriented Programming Concepts
Tip
Tip

Tip 1 : Practice DSA problems as much as you can
Tip 2 : Always focus on the quality of problems compared to the quantity of coding problems
Tip 3 : Practice puzzle problems, and brush up on your System Design fundamentals

Application process
Where: Referral
Eligibility: Nope
Resume Tip
Resume tip

Tip 1 : Try to mention the GitHub links to all projects and to all your coding profiles.
Tip 2 : Make sure to write the project description in bulletin point and also mention the impact in terms of quantifiable value.

Interview rounds

01
Round
Medium
Online Coding Test
Duration60 Minutes
Interview date3 Feb 2021
Coding problem2

It was a 1 hours Hackerrank coding test, and I have been given 24 hours to attempt the test. There was 2 Medium to Hard coding questions, and the topics were from Graphs, Trees.

1. Rotting Oranges

Moderate
20m average time
78% success
0/80
Asked in companies
IBMSliceSamsung R&D Institute

You have been given a grid containing some oranges. Each cell of this grid has one of the three integers values:

  • Value 0 - representing an empty cell.
  • Value 1 - representing a fresh orange.
  • Value 2 - representing a rotten orange.
  • Every second, any fresh orange that is adjacent(4-directionally) to a rotten orange becomes rotten.

    Your task is to find out the minimum time after which no cell has a fresh orange. If it's impossible to rot all the fresh oranges then print -1.

    Note:
    1. The grid has 0-based indexing.
    2. A rotten orange can affect the adjacent oranges 4 directionally i.e. Up, Down, Left, Right.
    
    Problem approach

    1). First make a queue of pair of coordinates
    2). Insert all those coordinates where value is 2
    3). Run BFS on 2D Grid 
    4). Then run a while loop and correspondingly make the movement from one cell to another only if value at next cell is 1 and the movement doesn't cross matrix boundaries and then make that value to 2, and corresponding increase the time value by 1 in each loop.
    5). At the end, if we are left with atleast cell where value is 1 then return -1, else return time.

    Try solving now

    2. Root to Leaf Path

    Moderate
    25m average time
    70% success
    0/80
    Asked in companies
    OracleUberAmazon

    Ninja is having a good time in solving new questions of Binary Trees from Code Studio. He is now encountered with a question having statement as "You are given a binary tree consisting of 'N' nodes numbered from 1 to 'N'. Your task is to print all the root to leaf paths of the binary tree".

    Ninja is stuck into this problem and could not able to find the logic. Help Ninja in solving the problem.

    Note :

    A leaf of a Binary Tree is the node which does not have a left child and a right child.
    
    For Example :
    Given a binary tree :
    

    alt txt

    All the root to leaf paths are :
    1 2 4
    1 2 5 
    1 3
    

    Note :

    1. Two nodes may have the same value associated with it.
    2. The root node will be fixed and will be provided in the function.
    3. Note that the nodes in a path will appear in a fixed order. For example, 1 2 3 is not the same as 2 1 3.
    4. Each path should be returned as a string consisting of nodes in order and separated by a space.
    5. The path length may be as small as ‘1’.
    
    Problem approach

    1). I used recursion here to generate all root to left paths of the given Binary Tree.
    2). The base condition for this recursive function was when we hit the leaf node, we need to check whether the sum equals to targetSum, if yes then insert the path vector into the answer.
    3). Once you traverse the whole binary tree, you'll get your resultant root-to-leaf nodes.

    Try solving now
    02
    Round
    Medium
    Face to Face
    Duration60 Minutes
    Interview date9 Feb 2021
    Coding problem2

    It was a medium-level round, where two DSA Questions were being asked.

    1. Remove Invalid Parentheses

    Hard
    50m average time
    50% success
    0/120
    Asked in companies
    UberPayPalMAQ Software

    You are given a string consisting only of parentheses and letters. Your task is to remove the minimum number of invalid parentheses and return all possible unique, valid strings thus obtained.

    Note:

    1) A string is valid only if every left parenthesis has corresponding right parentheses in the same order.
    
    For example Given ‘STR’ = (())()) is not a valid string, whereas ‘STR’ = (())() is a valid string.
    
    Problem approach

    1). Here, l used a stack for checking the validity of parentheses, and later remove the indexes of invalid parentheses from the string s. 

    2). First, iterate the string s and mark the index of those characters which need to be removed to make it parentheses string using a special symbol '#'.

    Here, a stack is used for finding the valid pair of parentheses, and while doing so also mark the indexes of invalid parentheses in s.

    3). Finally, iterate s again and append non-marked symbol (#) to ans.

    Try solving now

    2. Count Triplets

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

    You have been given an integer ‘X’ and a non-decreasing sorted doubly linked list with distinct nodes.

    Your task is to return the number of triplets in the list that sum up to the value ‘X’.

    Problem approach

    1). Here, we hash the indices of all elements in a hashMap. In case of repeated elements, the last occurrence index would be stored in hashMap.

    2). Here also we fix a number (num[i]), by traversing the loop. But the loop traversal here for fixing numbers would leave the last two indices. These last two indices would be covered by the nested loop.

    3). If the number fixed is +ve, break there because we can't make it zero by searching after it.
    Make a nested loop to fix a number after the first fixed number. (num[j])

    4). To make sum 0, we would require the -ve sum of both fixed numbers. Let us say this required.
    Now, we will find the this required number in hashMap. 

    5). If it exists in hashmap and its last occurrence index > 2nd fixed index, we found our triplet. Push it in answer vector.

    6). Update j to last occurence of 2nd fixed number to avoid duplicate triplets.
    7). Update i to last occurence of 1st fixed number to avoid duplicate triplets.
    8)> Return answer vector.

    Try solving now
    03
    Round
    Easy
    Face to Face
    Duration90 Minutes
    Interview date13 Feb 2021
    Coding problem2

    1 DSA Question and Fundamentals of System Design are being asked. Discussion on my Projects.

    1. Remove BST keys outside the given range

    Easy
    15m average time
    85% success
    0/40
    Asked in companies
    PhonePePayPalSamsung R&D Institute

    Given a Binary Search Tree (BST) and a range [min, max], remove all keys which are outside the given range. The modified tree should also be BST.

    Problem approach

    1). I used the Recursive here.
    2). If current node value is greater than low, and less than right, then update the left and right child node of cur node by calling the recursion function for their left and right child individually.
    3). If current node value is less than low, then call recursive function for right child.
    4). Else call recursive function for left child.

    Try solving now

    2. DBMS based question

    Tell the difference between SQL and NoSQL, when to use them. And have you used any of them in the previous projects. (Learn)

    Problem approach

    Tip 1 : Understand the problem and think rationally taking into consideration the trade-offs that you would be making in choosing the one than the other.
    Tip 2 : Always speak it out loud and make sure that you and the interviewer are on the same page.
    Tip 3 : Always asked and clarify the requirements from the interviewer beforehand.

    04
    Round
    Easy
    HR Round
    Duration45 minutes
    Interview date23 Feb 2021
    Coding problem0

    Here, the interviewer asked about different questions to know more about me, and why I wanted to join PayPal.

    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 | 7 problems
    Interviewed by PayPal
    0 views
    0 comments
    0 upvotes
    company logo
    SDE - 1
    4 rounds | 4 problems
    Interviewed by PayPal
    1790 views
    0 comments
    0 upvotes
    company logo
    SDE - 1
    2 rounds | 4 problems
    Interviewed by PayPal
    1684 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