Info Edge India (Naukri.com) interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Info Edge India (Naukri.com)
upvote
share-icon
3 rounds | 8 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 4 months
Topics: Data Structures, Algorithms, System Design, Aptitude, OOPS
Tip
Tip

Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.

Application process
Where: Campus
Eligibility: Above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.

Interview rounds

01
Round
Easy
Online Coding Test
Duration60 minutes
Interview date12 Sep 2016
Coding problem2

Two coding questions were given in the first round to be solved in 60 minutes.

1. Rearrange array elements.

Easy
15m average time
85% success
0/40
Asked in companies
Info Edge India (Naukri.com)Barclays

Given an array ‘A’ having ‘N’ integers and an integer ‘m’. You need to rearrange the array elements such that after re-arrangement difference of array elements with ‘m’ should be in a sorted fashion.

If the difference between any two array elements and ‘m’ is the same, then the element which comes first in the given array will be placed first in the re-arranged array.

For Example
If we have A =  [3, 5, 7, 9, 2, 6]  and m = 5.
Difference of array elements with m : [2, 0, 2, 4, 3, 1].
Array after rearrangement : [5, 6, 3, 7, 2, 9].
Problem approach

A direct approach would be to use an additional empty array of size n, where n is the size of the input array. Manage two pointers, one at the starting index of the input array and another one at the endpoint. Copy the last element of the array first, in the additional array, then the first element of the array, and increment both the pointers one index further. Follow the same pattern unless the start pointer becomes less than or equal to the end pointer. This approach has a time complexity of O(n) and used O(n) auxiliary space. 
To solve the question in O(1) auxiliary space, multiple modular tricks can be used to rearrange the array. Initialize the indices of the first max and first min elements as 0 and n-1 where n is the size of the array respectively. Then, iterate over the input array and store the maximum elements in a decreasing order at even places, Similarly, store the minimum elements of the input array in increasing order at odd places. The array thus obtained will be the resultant array.

Algorithm :
max_index : Index of remaining maximum element
(Moves from right to left)
min_index : Index of remaining minimum element
(Moves from left to right)

Initialize: max_index = 'n-1'
min_index = 0 
max_element = arr[max_index] + 1 //can be any element which is more than the maximum value in array
For i = 0 to n-1 
If 'i' is even
arr[i] += arr[max_index] % max_element * max_element 
max_index-- 
ELSE // if 'i' is odd
arr[i] += arr[min_index] % max_element * max_element
min_index++

Try solving now
Hard
20m average time
80% success
0/120
Asked in companies
Goldman SachsUberApple

You are given an arbitrary binary tree, a node of the tree, and an integer 'K'. You need to find all such nodes which have a distance K from the given node and return the list of these nodes.


Distance between two nodes in a binary tree is defined as the number of connections/edges in the path between the two nodes.


Note:

1. A binary tree is a tree in which each node has at most two children. 
2. The given tree will be non-empty.
3. The given tree can have multiple nodes with the same value.
4. If there are no nodes in the tree which are at distance = K from the given node, return an empty list.
5. You can return the list of values of valid nodes in any order. For example if the valid nodes have values 1,2,3, then you can return {1,2,3} or {3,1,2} etc.
Example :

Sample Output 2 explanation

Consider this tree above. The target node is 5 and K = 3. The nodes at distance 1 from node 5 are {2}, nodes at distance 2 from node 5 are {1, 4} and nodes at distance 3 from node 5 are {6, 3}.
Problem approach

Recursion can be applied in this problem. Maintain a variable k to store the distance. If the node is null or k <0 , return. If k==0, this is the node at distance k from the root node. So, print it. Make calls for left and right subtree and decrement the distance by 1 (k-1).

Time Complexity: O(n) where n is number of nodes in the given binary tree.
Space Complexity : O(height of the binary tree).

Try solving now
02
Round
Easy
Face to Face
Duration60 minutes
Interview date13 Sep 2016
Coding problem5

This was a technical round with questions based on DSA, DBMS, Computer Networking and project based questions.

1. Pattern: Triangle of numbers

Easy
15m average time
85% success
0/40
Asked in companies
Info Edge India (Naukri.com)ImpelsysAthenahealth

Ninja is given a pattern. Now he is asked to print the same pattern for any given ‘N’ number of rows.

For example, Pattern for ‘N’ = 4 will be.
   1
  232
 34545
4567654
Problem approach

In pattern based programs, two things need to be taken care of : No. of lines and If the pattern is increasing or decreasing per line. 
Pseudo Code :
printPattern(n) :
num = 1;
gap = n - 1;
for (j=1 to n , j++):
{
num = j;
for (i=1 to gap, i++)
print(" ")
gap --;
for (i=1 to j, i++)
{
print num
num++;
}
num--;
num--;
for (i=1 to i {
print num
num--;
}
print new line
}

Try solving now

2. Technical Question

What is web server and application server ?

Problem approach

Web Server: It is a computer program that accepts the request for data and sends the specified documents. Web server may be a computer where the online content is kept. Example :Resin
Application server: It encompasses Web container as well as EJB container. Application servers organize the run atmosphere for enterprises applications. Example : Web logic

3. Technical Question

How internet works?

Problem approach

There are two main concepts that are fundamental to the way the Internet functions: packets and protocols. 
Packets: In networking, a packet is a small segment of a larger message. Each packet contains both data and information about that data. The information about the packet's contents is known as the "header," and it goes at the front of the packet so that the receiving machine knows what to do with the packet.
Protocols : In networking, a protocol is a standardized way of doing certain actions and formatting data so that two or more devices are able to communicate with and understand each other. Because all Internet-connected computers and other devices can interpret and understand these protocols, the Internet works no matter who or what connects to it.

4. DBMS Question

Write query to find nth highest salary.

Problem approach

TOP keyword can be used to find the nth highest salary. By default ORDER BY clause print rows in ascending order, since we need the highest salary at the top, we have used ORDER BY DESC, which will display salaries in descending order. Again DISTINCT is used to remove duplicates. The outer query will then pick the topmost salary, which would be your Nth highest salary.
SQL query : 
SELECT TOP 1 salary
FROM ( 
SELECT DISTINCT TOP N salary
FROM #Employee 
ORDER BY salary DESC 
) AS temp
ORDER BY salary

5. DBMS Question

Proper discussion on my projects that were mentioned in the resume. They usually ask to make class diagram, ER diagram of project etc.

03
Round
Easy
HR Round
Duration30 minutes
Interview date13 Sep 2016
Coding problem1

Typical HR round with behavioral problems.

1. Basic HR Questions

1. Firstly HR asked to introduce yourself
2. Why you want to join this company?
3. My family background, asked about hobbies, academic achievements

Problem approach

Tip 1 : The cross questioning can go intense some time, think before you speak.
Tip 2 : Be open minded and answer whatever you are thinking, in these rounds I feel it is important to have opinion.
Tip 3 : Context of questions can be switched, pay attention to the details. It is okay to ask questions in these round, like what are the projects currently the company is investing, which team you are mentoring. How all is the work environment etc.
Tip 4 : Since everybody in the interview panel is from tech background, here too you can expect some technical questions. No coding in most of the cases but some discussions over the design can surely happen.

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
SDE - 1
4 rounds | 4 problems
Interviewed by Info Edge India (Naukri.com)
2375 views
0 comments
0 upvotes
SDE - 1
3 rounds | 8 problems
Interviewed by Info Edge India (Naukri.com)
904 views
0 comments
0 upvotes
SDE - 1
4 rounds | 9 problems
Interviewed by Info Edge India (Naukri.com)
4423 views
0 comments
0 upvotes
SDE - 1
2 rounds | 4 problems
Interviewed by Info Edge India (Naukri.com)
517 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
58237 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35147 views
7 comments
0 upvotes