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

Software Engineer

MagicPIN
upvote
share-icon
3 rounds | 4 Coding problems

Interview preparation journey

expand-icon
Journey
I started my coding journey from the second year of graduation. I asked and consulted seniors on how to start in my coding journey. I started with DSA first. I was not consistent initially, but in my seventh semester, I started practising DSA on a regular basis. I maintained a streak of 10-15 questions daily. In my last semester, I learnt web development and did some projects as well that helped me enhance my resume. Finally, I was ready to apply in different companies for placements.
Application story
This company visited our campus for placement. It first did the shortlisting based on resume and CGPA. After that, an online assessment was conducted, and on that basis, 20 candidates were shortlisted for further rounds.
Why selected/rejected for the role?
I gave correct and optimized solutions for almost all the questions that were asked in the coding rounds. I also built the optimal solution starting from the brute force algorithm which also added to my points. Communication is the key to selection.
Preparation
Duration: 5 months
Topics: Data Structures , Algorithms, C++ ,JAVA, Oops
Tip
Tip

Tip 1: Always remember that question-solving is not everything in the interview, it's a part of the interview. Communicating well with the interviewer is the most important thing during the interview. 

Tip 2: Also, practice a lot of Data Structures and Algorithms based questions that I have practiced from Coding Ninjas and on other coding portals.

Tip 3: Be consistent in your practice

Application process
Where: Campus
Eligibility: 7.5
Resume Tip
Resume tip

Tip 1: Mention good projects and only those skills in which you are confident.
Tip 2: Justify your resume

Interview rounds

01
Round
Hard
Online Coding Test
Duration180 mins
Interview date24 Dec 2020
Coding problem1

Knapsack problem

1. Colourful Knapsack

Hard
45m average time
0/120
Asked in companies
AdobeIBMDell Technologies

You are given 'N' stones labeled from 1 to 'N'. The 'i-th' stone has the weight W[i]. There are 'M' colors labeled by integers from 1 to 'M'. The 'i-th' stone has the color C[i] which is an integer between 1 to 'M', both inclusive.

You have been required to fill a Knapsack with these stones. The Knapsack can hold a total weight of 'X'.

You are required to select exactly 'M' stones; one of each color. The sum of the weights of the stones must not exceed 'X'. Since you paid a premium for a Knapsack with capacity 'X', you are required to fill the Knapsack as much as possible.

Write a program to calculate the best way to fill the Knapsack - that is, the unused capacity should be minimized.

Problem approach

This was solved by me through dynamic programming. Let dp[i][j] denote the maximum possible weight you can fill in the bag with a total capacity of j using exactly one stone of each color from 1 to i. Now you can club all same-colored stones in a vector. Then this problem is same as the classical knapsack problem and I passed all test cases and selected for the next round.

Try solving now
02
Round
Easy
Face to Face
Duration40 mins
Interview date24 Dec 2020
Coding problem2

It was face to face interview consisting of two dsa based questions

1. Longest Increasing Subsequence

Moderate
30m average time
65% success
0/80
Asked in companies
PhonePeChegg Inc.Barclays

For a given array with N elements, you need to find the length of the longest subsequence from the array such that all the elements of the subsequence are sorted in strictly increasing order.

Strictly Increasing Sequence is when each term in the sequence is larger than the preceding term.

For example:
[1, 2, 3, 4] is a strictly increasing array, while [2, 1, 4, 3] is not.
Problem approach

Firstly I gave recursion approach but then the interviewer asked me to optimize that so I gave him a standard DP approach for the longest increasing subsequences by storing the result and use them for future calculations of bigger problem.

Try solving now

2. Top View Of Binary Tree

Moderate
25m average time
70% success
0/80
Asked in companies
MicrosoftThought WorksSamsung R&D Institute

You are given a Binary Tree of 'n' nodes.


The Top view of the binary tree is the set of nodes visible when we see the tree from the top.


Find the top view of the given binary tree, from left to right.


Example :
Input: Let the binary tree be:

Example

Output: [10, 4, 2, 1, 3, 6]

Explanation: Consider the vertical lines in the figure. The top view contains the topmost node from each vertical line.
Problem approach

I simply used level order traversal and the concept of horizontal distance. Whenever we encountered the first node for a particular horizontal distance then we store that in the map and at last in the map we have tree top view. The interviewer asked me to write its code and I wrote a clean and commented code for it and he was satisfied with that.

Try solving now
03
Round
Easy
HR Round
Duration30 mins
Interview date25 Dec 2020
Coding problem1

HR round was there. It was very smooth.

1. Basic HR Questions

1. Tell me about yourself and your family background.
2 Major challenges you faced during your college time
3. Strength and weaknesses

Problem approach

Tip 1: Whatever you are replying to, please try to justify your answer
Tip 2: Always be honest 
Tip 3: Eye contact is very important

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 - 1
3 rounds | 6 problems
Interviewed by MagicPIN
1790 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3452 views
0 comments
0 upvotes
SDE - 1
3 rounds | 7 problems
Interviewed by MagicPIN
485 views
0 comments
0 upvotes
Associate Software Developer
3 rounds | 8 problems
Interviewed by MagicPIN
611 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer
3 rounds | 7 problems
Interviewed by Optum
7874 views
1 comments
0 upvotes
company logo
Software Engineer
5 rounds | 5 problems
Interviewed by Microsoft
9973 views
1 comments
0 upvotes
company logo
Software Engineer
2 rounds | 4 problems
Interviewed by Amazon
4310 views
1 comments
0 upvotes