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

SDE - 1

PayPal
upvote
share-icon
4 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 6 months
Topics: Arrays, Graphs, trees, Linked Lists, Strings, Dynamic Programming
Tip
Tip

Tip 1 : Keep resume crisp
Tip 2 : Practice coding
Tip 3 : Understand DS & Algo

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

Tip 1 : One Page resume
Tip 2 : List down achievements, projects

Interview rounds

01
Round
Hard
Online Coding Test
Duration120 minutes
Interview date20 Aug 2021
Coding problem0

Duration - 2h
Two questions, on strings, graph

02
Round
Medium
Video Call
Duration60 minutes
Interview date3 Sep 2021
Coding problem2

1. Rotting Oranges

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

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

    - Count number of fresh oranges
    - Add all rotting oranges to queue (index, i.e., (r,c))
    - Use BFS (4 Directional check)
    - If no fresh oranges are left, return time taken or else -1

    Try solving now

    2. Delete a Node from Linked List

    Moderate
    40m average time
    67% success
    0/80
    Asked in companies
    CIS - Cyber InfrastructureAmazonGroww

    You have been given a linked list of integers. Your task is to write a function that deletes a node from a given position, 'POS'.

    Note :
    Assume that the Indexing for the linked list always starts from 0.
    
    If the position is greater than or equal to the length of the linked list, you should return the same linked list without any change.
    
    Illustration :
    The following images depict how the deletion has been performed.
    

    Image-I :

    Alt txt

    Image-II :

    Alt txt

    Problem approach

    - Normal deletion of nodes in linked list, handle all the cases
    - The case when the node is to be deleted is given (not head) - swap values & delete node

    Try solving now
    03
    Round
    Medium
    Video Call
    Duration60 minutes
    Interview date9 Sep 2021
    Coding problem3

    1. K Most Frequent Words

    Moderate
    36m average time
    65% success
    0/80
    Asked in companies
    SalesforceDunzoOla

    You have been given an array/list 'WORDS' of 'N' non-empty words, and an integer 'K'. Your task is to return the 'K' most frequent words sorted by their frequency from highest to lowest.

    Note:

    If two words have the same frequency then the lexicographically smallest word should come first in your answer.
    

    Follow up:

    Can you solve it in O(N * logK) time and O(N) extra space? 
    
    Problem approach

    - Use min heap with custom sorting (lambda function)

    Try solving now

    2. Data Structure based Question

    Which is the best data structure that could used in any case? Why did you choose it?
    Which data structure could be used in a scenario where several entities that are connected to each other, like facebook? Why?

    Problem approach

    Tip 1 : Think of use case & then choose a DS.

    3. Buy and Sell Stock

    Hard
    0/120
    Asked in companies
    Samsung R&D InstituteMicrosoftSalesforce

    You are Harshad Mehta’s friend. He told you the price of a particular stock for the next ‘n’ days.


    You are given an array ‘prices’ which such that ‘prices[i]’ denotes the price of the stock on the ith day.


    You don't want to do more than 2 transactions. Find the maximum profit that you can earn from these transactions.


    Note

    1. Buying a stock and then selling it is called one transaction.
    
    2. You are not allowed to do multiple transactions at the same time. This means you have to sell the stock before buying it again. 
    
    Example:
    Input: ‘n’ = 7, ‘prices’ = [3, 3, 5, 0, 3, 1, 4].
    
    Output: 6
    
    Explanation: 
    The maximum profit can be earned by:
    Transaction 1: Buying the stock on day 4 (price 0) and then selling it on day 5 (price 3). 
    Transaction 2: Buying the stock on day 6 (price 1) and then selling it on day 6 (price 4).
    Total profit earned will be (3 - 0) + ( 4 - 1) = 6. 
    
    Problem approach

    Use DP.

    Try solving now
    04
    Round
    Easy
    HR Round
    Duration60 minutes
    Interview date14 Sep 2021
    Coding problem0

    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