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

Software Developer

EnKash
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Journey
I started my coding journey in the second year of graduation. I asked and consulted seniors on how to start my coding journey. I started with DSA first. I was not consistent initially, but I started practicing DSA regularly in my seventh semester. I maintained a streak of 10-15 questions daily. In my last semester, I learned web development and did some projects that helped me enhance my resume. Finally, I was ready to apply to different companies for placements.
Application story
The HR contacted me through email. I was asked to appear for the coding test. I applied through the link provided,, and the further rounds were carried out.
Why selected/rejected for the role?
I was selected because I was able to answer all coding questions properly. I started with a naive approach and went ahead to explain the optimised approach for almost all the questions. Moreover, I had a deep understanding of OS concepts as well.
Preparation
Duration: Duration: 3 Months
Topics: Topics: Data Structures , Algorithms, C++ ,JAVA
Tip
Tip

Tip 1 : Always remember question-solving is not everything in the interview, its a part of interview. Communicating well with the interviewer is most important thing during the interview. 
Tip 2 : Also practice lot of Data Structures and Algorithms based questions that I have practiced from Coding Ninjas and on other coding portals.

Application process
Where: Referral
Eligibility: 7.5 CGPA
Resume Tip
Resume tip

Tip 1 : Never leave any topic from any chapter / Subject
Tip 2 : Learn to explain your thoughts well
Tip 3 : Learn from previous experiences / interviews / problems asked.
Tip 4 : Atleast 4 projects in Resume

Interview rounds

01
Round
Medium
Face to Face
Duration60 minutes
Interview date12 Jun 2022
Coding problem2

1. Positive Negative Pair

Easy
10m average time
90% success
0/40
Asked in companies
HSBCGrowwOptum

Given an array of distinct integers, find all the pairs having positive value and negative value of a number that exists in the array. Return the pairs in any order.

Note:
The pair consists of equal absolute values, one being positive and another negative.

Return an empty array, if no such pair exists.
Problem approach

I asked for some clarifications whether I should print all distinct x‘s or if I should print an x if a pair of +x and -x is encountered. The first approach I told was to use a map and I was keeping a flag for +x and -x if it’s found once. Later he asked me to print all pairs, so I stored the frequencies of all the elements in the map and iterated through the negative elements and for each element x , I would print x min(count[-x],count[+x]) times. He said he can’t afford that much space and he wanted me to optimise space further. So I told him a 2 pointer approach where I sort the array once and then keep two pointers to the start and end. I would move the start pointer forward if the sum is less than 0 and I’ll move the end pointer backward if the sum is greater than 0. He was fine with the solution and asked me to code it in a paper. I wrote the code and walked him through it.

Try solving now

2. Largest Distance Between Two Nodes In A Tree

Moderate
15m average time
85% success
0/80
Asked in companies
SamsungInnovaccerMicrosoft

You are given an arbitrary unweighted rooted tree which consists of N nodes, 0 to N - 1. Your task is to find the largest distance between two nodes in the tree.

The distance between two nodes is the number of edges in a path between the nodes (there will always be a unique path between any pair of nodes since it is a tree).

Note :
Use zero-based indexing for the nodes.

The tree is always rooted at 0.
Problem approach

Simple BFS worked

Try solving now
02
Round
Medium
Face to Face
Duration60 minutes
Interview date16 Jun 2022
Coding problem2

1. Square Root of a number

Easy
15m average time
80% success
0/40
Asked in companies
SamsungAmazonMicrosoft

You are given a positive integer ‘n’.


Your task is to find and return its square root. If ‘n’ is not a perfect square, then return the floor value of sqrt(n).


Example:
Input: ‘n’ = 7

Output: 2

Explanation:
The square root of the number 7 lies between 2 and 3, so the floor value is 2.


Problem approach

So he asked me to explain all approaches from brute force to the optimal solution, which he was expecting me to do in O(logn), and use different methods for each implementations(different methods in same code).

Try solving now

2. N Queens

Hard
55m average time
35% success
0/120
Asked in companies
Thought WorksTwitterAdobe

You are given an integer 'N'. For a given 'N' x 'N' chessboard, find a way to place 'N' queens such that no queen can attack any other queen on the chessboard.

A queen can be killed when it lies in the same row, or same column, or the same diagonal of any of the other queens. You have to print all such configurations.

Problem approach

I solved it using backtracking

Try solving now
03
Round
Easy
Face to Face
Duration60 minutes
Interview date19 Jun 2022
Coding problem2

1. Colorful 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

Try solving now

2. 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

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 | 8 problems
Interviewed by Amazon
8518 views
0 comments
0 upvotes
Analytics Consultant
3 rounds | 10 problems
Interviewed by ZS
907 views
0 comments
0 upvotes
company logo
SDE - Intern
1 rounds | 3 problems
Interviewed by Amazon
3320 views
0 comments
0 upvotes
company logo
SDE - 2
4 rounds | 6 problems
Interviewed by Expedia Group
2581 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Developer
5 rounds | 14 problems
Interviewed by Microsoft
3931 views
1 comments
0 upvotes
company logo
Software Developer
6 rounds | 12 problems
Interviewed by SAP Labs
2806 views
0 comments
0 upvotes
company logo
Software Developer
3 rounds | 3 problems
Interviewed by Amazon
1134 views
0 comments
0 upvotes