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

SDE - Intern

Park+
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 3 months
Topics: OOP, Data Structures, Algorithms, DP, college project
Tip
Tip

Tip 1 : Have in-depth knowledge of at least one OOPs-based language and practice DSA.
Tip 2 : Prepare for questions on your projects and at least 1 project is a must.
 

Application process
Where: Referral
Resume Tip
Resume tip

Tip 1 : Avoid putting false stuff in resume
Tip 2 : Have a good project and try to mention your coding profiles

Interview rounds

01
Round
Medium
Face to Face
Duration60 minutes
Interview date16 Feb 2021
Coding problem2

It was a Data Structure round which consisted of 2 coding questions of medium difficulty.

1. Add One To Linked List

Easy
23m average time
0/40
Asked in companies
Park+Josh Technology Group

You're given a positive integer represented in the form of a singly linked-list of digits. The length of the number is 'n'.


Add 1 to the number, i.e., increment the given number by one.


The digits are stored such that the most significant digit is at the head of the linked list and the least significant digit is at the tail of the linked list.


Example:
Input: Initial Linked List: 1 -> 5 -> 2

Output: Modified Linked List: 1 -> 5 -> 3

Explanation: Initially the number is 152. After incrementing it by 1, the number becomes 153.
Problem approach

I gave the interviewer two approaches to solve the problem recursive approach/ reversing the LinkedList and adding 1 and then reversing that back.
He asked me to code out the recursive approach that I did and ran over test cases given by him and that worked.

Simple recursion would help

Just there's an edge case where if 9 is the number then adding 1 will need to be 1->0 so you will need to create new node

Try solving now

2. Search In Rotated Sorted Array

Moderate
30m average time
65% success
0/80
Asked in companies
FreshworksExpedia GroupPayPal

Aahad and Harshit always have fun by solving problems. Harshit took a sorted array consisting of distinct integers and rotated it clockwise by an unknown amount. For example, he took a sorted array = [1, 2, 3, 4, 5] and if he rotates it by 2, then the array becomes: [4, 5, 1, 2, 3].

After rotating a sorted array, Aahad needs to answer Q queries asked by Harshit, each of them is described by one integer Q[i]. which Harshit wanted him to search in the array. For each query, if he found it, he had to shout the index of the number, otherwise, he had to shout -1.

For each query, you have to complete the given method where 'key' denotes Q[i]. If the key exists in the array, return the index of the 'key', otherwise, return -1.

Note:

Can you solve each query in O(logN) ?
Problem approach

Instead of two or more passes of binary search the result can be found in one pass of binary search. The binary search needs to be modified to perform the search. The idea is to create a recursive function that takes l and r as a range in input and the key.

Try solving now
02
Round
Medium
Face to Face
Duration90 minutes
Interview date17 Feb 2021
Coding problem2

Interviewer was good and was helping by giving proper hints

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

    This is a standard algorithm multisource bfs using queue

    Try solving now

    2. Reverse A LL

    Moderate
    30m average time
    65% success
    0/80
    Asked in companies
    PhonePeMicrosoftHCL Technologies

    Ninjas is practicing problems on the linked list. He came across a problem in which he has given a linked list of ‘N’ nodes and two integers, ‘LOW’ and ‘HIGH’. He has to return the linked list ‘HEAD’ after reversing the nodes between ‘LOW’ and ‘HIGH’, including the nodes at positions ‘LOW’ and ‘HIGH’.

    Problem approach

    Create two pointers and traverse the linked list from both ends. At every step swap nodes by interchanging the links of the nodes

    Try solving now
    03
    Round
    Medium
    Video Call
    Duration60 minutes
    Interview date17 Feb 2021
    Coding problem1

    This was the CTO Round has good discussion with the CTO

    1. Snake and Ladder

    Moderate
    30m average time
    60% success
    0/80
    Asked in companies
    OlaDunzoIntuit

    You have been given a Snake and Ladder Board with 'N' rows and 'N' columns with the numbers written from 1 to (N*N) starting from the bottom left of the board, and alternating direction each row.

    For example

    For a (6 x 6) board, the numbers are written as follows:
    

    6*6 Board

    You start from square 1 of the board (which is always in the last row and first column). On each square say 'X', you can throw a dice which can have six outcomes and you have total control over the outcome of dice throw and you want to find out the minimum number of throws required to reach the last cell.
    Some of the squares contain Snakes and Ladders, and these are possibilities of a throw at square 'X':
    You choose a destination square 'S' with number 'X+1', 'X+2', 'X+3', 'X+4', 'X+5', or 'X+6', provided this number is <= N*N.
    If 'S' has a snake or ladder, you move to the destination of that snake or ladder.  Otherwise, you move to S.
    A board square on row 'i' and column 'j' has a "Snake or Ladder" if board[i][j] != -1. The destination of that snake or ladder is board[i][j].
    
    Note :
    You can only take a snake or ladder at most once per move: if the destination to a snake or ladder is the start of another snake or ladder, you do not continue moving - you have to ignore the snake or ladder present on that square.
    
    For example, if the board is:
    -1 1 -1
    -1 -1 9
    -1 4 -1
    Let's say on the first move your destination square is 2  [at row 2, column 1], then you finish your first move at 4 [at row 1, column 2] because you do not continue moving to 9 [at row 0, column 0] by taking the ladder from 4.
    
    A square can also have a Snake or Ladder which will end at the same cell.
    For example, if the board is:
    -1 3 -1
    -1 5 -1
    -1 -1 9
    Here we can see Snake/Ladder on square 5 [at row 1, column 1] will end on the same square 5.
    
    Problem approach

    Implemented this using python dictionary by initiating that with values like {99:3, 10:30} and just generate random number (dice) and 1 to 100 if counter reaches 100 game stops else roll dice and check the number in the dict for snake or ladder.

    Try solving now

    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
    SDE - Intern
    4 rounds | 7 problems
    Interviewed by Park+
    3197 views
    0 comments
    0 upvotes
    QA Engineer
    3 rounds | 6 problems
    Interviewed by Park+
    1224 views
    0 comments
    0 upvotes
    SDE - 1
    3 rounds | 7 problems
    Interviewed by Park+
    1159 views
    0 comments
    0 upvotes
    SDE - 1
    3 rounds | 7 problems
    Interviewed by Park+
    474 views
    0 comments
    0 upvotes
    Companies with similar interview experiences
    company logo
    SDE - Intern
    2 rounds | 4 problems
    Interviewed by Arcesium
    3688 views
    0 comments
    0 upvotes
    company logo
    SDE - Intern
    3 rounds | 5 problems
    Interviewed by Arcesium
    2649 views
    0 comments
    0 upvotes
    company logo
    SDE - Intern
    3 rounds | 5 problems
    Interviewed by BNY Mellon
    2323 views
    0 comments
    0 upvotes