Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Phone Pe interview experience Real time questions & tips from candidates to crack your interview

Software Development

Phone Pe
upvote
share-icon
3 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Journey
Before cracking any interview, one needs to strengthen their basics. So, I started practising DSA and reading all the vital topics and subjects like DBMS, DSA, Networking, and Operating Systems. After preparing the top 100 or 150 questions on each topic, I prepared all my projects and resume which was the most important step. Within my 4 year journey in college, I focused on DSA, Resume building and core fundamentals.
Application story
This company visited to my campus for the placement. We just had to upload resume and fill all details in the form. After the online test, around15 candidates were selected for interviews.
Why selected/rejected for the role?
I was able to clear all the rounds. I think it was because I answered correctly to almost all the solutions, gave quick answers, had good projects listed on my resume and had a little knowledge about the company. I was able to impress the interviewer.
Preparation
Duration: 1+2 months (rigorous practicing)
Topics: 1. C++ basic Coding + Data structures knowledge (learned during the two years of college Courses + Coding Ninjas course of C++ introduction and C++ data structures) 2. OOPs + Pointers (best and complete material for interviews is available at Geeks for geeks) 3. Dynamic programming and Recursion best explained in (Coding Ninjas course) + (Youtube channel of Aditya Verma if you want free material ) 4. Graphs , Hashmaps and Priority Queues (again I found Coding Ninjas course to be super amazing) 5. Operating system + DBMS(theory part) (I found best material of Gate smashers (youtube channel)) 6. Networking (just required for very few companies) (I liked TutorialsPoint tutorials a lot (very concise and to the point ))
Tip
Tip

Tip 1 : Practice atleast(easy and medium questions from leetcode under(Top Interview Questions)) and all the questions from Gfg under(must to do coding questions for interviews))
Tip 2 : Don't learn each and every question you solved but try to solve question in a way that you can solve its variation during interviews
Tip 3 : Do one project(one is enough) which you can explain with full technical details (why you used this technology, and all logics you applied in implementation) 
Tip 4: Atleast read the round 1 (Coding round) Archives from (Geeks for geeks or Glassdoor). To get your mind prepared for the types of questions that company usually asks.(Coding round is the toughest Step in the whole Process to clear)

Application process
Where: Campus
Eligibility: CGPA above 6 and no backlogs (there was no branch criteria for eligibility)
Resume Tip
Resume tip

Tip 1: Have at least one project which you have made yourself and you should know all the technical questions related to that project (I feel project domain hardly matters like web development or android or ML/AI)
Tip 2: You should Put only those skills in resume :
1. Which the company requires (eg if you know company doesn't require Networking domain knowledge so 
don't include it unnecessary if you are not much confident in it)
2. For on campus internships resume shortlisting is very easy so don't add anything unnecessary which might 
cause you pain during interview.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration90 minutes
Interview date17 Sep 2020
Coding problem3

3 coding Questions:
1st : Easy question based on simple loop iteration
2nd :Medium level Dp question 
3rd : Medium level tree question(where we were not just required to complete the tree function but to build whole bst from 
scratch) 

It was conducted from 1:30 - 3:00 pm.
The coding platform was very good (as auto indentation and auto completion of brackets were there)
having camera on.

1. Ninja and the Storyteller

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

The exact statement was something of story type so i just remember the crux of that story:there was a kid who hears story from someone by paying him some money for every story and the storyteller tells him a extra story for every X amount of stories that the child can remember. Now its given that the child remembers the story once he hears that and don't forget it .Given : Initial amount child has X, cost of each Story Y(same for all stories), minimum stories he has to remember for a free story Z. We need to find the maximum stories that the child can hear.

Problem approach

It was a easy question:
First take a sum variable(to store final answer) and initialize it with 0.
Take a temp and store X/Y in it and add it to sum then apply a loop and check:
if temp < Z return the sum
else add temp/Z to sum and update temp to temp/Z and continue the process.

Try solving now

2. Best Time to Buy and Sell Stock II

Moderate
22m average time
0/80
Asked in companies
Phone PeAmazonFacebook

You have been given stock values/prices for N number of days. Every i-th day signifies the price of a stock on that day. Your task is to find the maximum profit which you can make by buying and selling the stocks.

 Note :
You may make as many transactions as you want but can not have more than one transaction at a time i.e, if you have the stock, you need to sell it first, and then only you can buy it again.
Problem approach

First I found that this can easily be done using the brute force approach of taking a hashmap for storing all the numbers (from min value in the input range to the maximum value in the input range )with their frequency of appearance. then I will again run a loop for each query range and output the values which will be greater than k.
in this solution 50% of the test cases gives TLE.

Then I realized that I need not to run the loop for each and every range rather I should take a array of 100000 size and :
first mark the start and end of each range in one loop
then fill the frequencies for the between elements by just looping from min to max value in my range
then for each query I got my answer in constant time by subtracting the frequency of the range elements from frequency array.

Try solving now

3. Time To Burn Tree

Hard
50m average time
50% success
0/120
Asked in companies
SprinklrZomatoOLX Group

You have a binary tree of 'N' unique nodes and a Start node from where the tree will start to burn. Given that the Start node will always exist in the tree, your task is to print the time (in minutes) that it will take to burn the whole tree.


It is given that it takes 1 minute for the fire to travel from the burning node to its adjacent node and burn down the adjacent node.


For Example :
For the given binary tree: [1, 2, 3, -1, -1, 4, 5, -1, -1, -1, -1]
Start Node: 3

    1
   / \
  2   3
     / \
    4   5

Output: 2

Explanation :
In the zeroth minute, Node 3 will start to burn.

After one minute, Nodes (1, 4, 5) that are adjacent to 3 will burn completely.

After two minutes, the only remaining Node 2 will be burnt and there will be no nodes remaining in the binary tree. 

So, the whole tree will burn in 2 minutes.
Problem approach

After thinking for some time I got that he wants me to find the diameter of BST because diameter will be the longest path for fire to travel.
I already solved the diameter problem earlier so it doesn't took me me much time to solve it.

Try solving now
02
Round
Hard
Online Coding Test
Duration80 minutes
Interview date18 Sep 2020
Coding problem1

This was a completely technical coding round where I was asked to solve the problems of data structures.
The codepad where i was asked to code was fine,
The interviewer was very friendly and was helpful and understanding.
I also asked him about his work and experience in the company and some other questions.

1. Maximum Path Sum in the matrix

Moderate
35m average time
70% success
0/80
Asked in companies
AmazonPayPalMicrosoft

You have been given an N*M matrix filled with integer numbers, find the maximum sum that can be obtained from a path starting from any cell in the first row to any cell in the last row.

From a cell in a row, you can move to another cell directly below that row, or diagonally below left or right. So from a particular cell (row, col), we can move in three directions i.e.

Down: (row+1,col)
Down left diagonal: (row+1,col-1)
Down right diagonal: (row+1, col+1)
Problem approach

First I just told him the most brute force approach of finding every possible path for every element of matrix then choose the maximum among those path and then store that max path in some other 2D matrix. He then discussed the time complexity of the solution
then I told him where the repetitions were occurring in this approach and then then I directly told him the best solution for this problem by using DP and starting from last element of mXn matrix

Try solving now
03
Round
Easy
HR Round
Duration45 minutes
Interview date18 Sep 2020
Coding problem1

It was held on Gmeet platform
The interviewer was very experienced person and was very nice too.
He made me comfortable by first introducing himself in a very detailed way and then asking me mine introduction
Since I feel that his internet connection was not very good so he turned off his camera but I decided not to turn off mine as in online interviews your face reviles your confidence 
the interviewer mostly asked me questions about my interests in technical field and the project that I have done

1. Basic HR Questions

He asked me about my project.

Why did you choose NoSQL database rather than SQL database?

Tell me about your current project, which you are working on.

What attracts you the most in this technical domain or world (where I answered AI and the bigdata).

Problem approach

Tip 1: The HR person is generally a very high experienced person so never tell him anything false just to impress him.
Tip 2: Try to include only that things in your introduction where you want to drive your discussion further
Tip 3: Try to show some interest in your growth and the work that they are offering you and in what sense they can help 
you build your skills better.

Here's your problem of the day

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

Skill covered: Programming

Suppose list1 is [2, 133, 12, 12], what is max(list1) in Python?

Choose another skill to practice
Start a Discussion
Similar interview experiences
company logo
SRE-Intern
3 rounds | 4 problems
Interviewed by Phone Pe
2576 views
0 comments
0 upvotes
company logo
SDE
3 rounds | 6 problems
Interviewed by Phone Pe
0 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by Phone Pe
0 views
0 comments
0 upvotes
company logo
Software Engineer
3 rounds | 7 problems
Interviewed by Phone Pe
1733 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Development
3 rounds | 4 problems
Interviewed by Amdocs
7737 views
0 comments
0 upvotes
company logo
Software Development
3 rounds | 5 problems
Interviewed by Microsoft
1279 views
0 comments
0 upvotes