Snapdeal Ltd. interview experience Real time questions & tips from candidates to crack your interview

Software Engineer

Snapdeal Ltd.
upvote
share-icon
4 rounds | 7 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 5 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
Coding Test - Pen and paper
Duration90 minutes
Interview date10 Apr 2015
Coding problem2

There were 22 MCQ questions of aptitude and technical based while 3 questions were of coding type.
Tips: MCQ questions were not time consuming , so try to do that questions in less time , so you will get enough time for coding questions.

1. Check for balanced parentheses in an expression.

Easy
10m average time
80% success
0/40
Asked in companies
OracleAmerican ExpressPayPal

You're given a string 'S' consisting of "{", "}", "(", ")", "[" and "]" .


Return true if the given string 'S' is balanced, else return false.


For example:
'S' = "{}()".

There is always an opening brace before a closing brace i.e. '{' before '}', '(' before ').
So the 'S' is Balanced.
Problem approach

A stack can be used to solve this question. 
We traverse the given string s and if we:
1. see open bracket we put it to stack
2. see closed bracket, then it must be equal to bracket in the top of our stack, so we check it and if it is true, we remove this pair of brackets.
3. In the end, if and only if we have empty stack, we have valid string.


Complexity: Time complexity is O(n): we put and pop each element of string from our stack only once. Space complexity is O(n).

Try solving now

2. Find next greater number with same set of digits

Moderate
15m average time
90% success
0/80
Asked in companies
Morgan StanleySamsungArcesium

You are given a string S which represents a number. You have to find the smallest number strictly greater than the given number which contains the same set of digits as of the original number i.e the frequency of each digit from 0 to 9 should be exactly the same as in the original number.

For example:
If the given string is 56789, then the next greater number is 56798. Note that although 56790 is also greater than the given number it contains 1 '0' which is not in the original number and also it does not contain the digit '8'.

Note:

The given string is non-empty.

If the answer does not exist, then return -1.

The given number does not contain any leading zeros.
Problem approach

Observations:
1. If all digits are sorted in descending order, then output is always “Not Possible”. 
2. If all digits are sorted in ascending order, then we need to swap last two digits. 
3. For other cases, we need to process the number from rightmost side to find the smallest of all greater numbers. 

Steps:
1. Traverse the given number from rightmost digit, keep traversing till you find a digit which is smaller than the previously traversed digit. If no such digit is found, then output is “Not Possible”.
2. Now search the right side of above found digit ‘d’ for the smallest digit greater than ‘d’. 
3. Swap the above found two digits.
4. Now sort all digits from position next to ‘d’ to the end of number. The number that we get after sorting is the required output.

Try solving now
02
Round
Medium
Face to Face
Duration60 minutes
Interview date10 Apr 2015
Coding problem2

My experience was very awesome , I answered all the questions , although in starting I was very nervous , so at starting interviewer help me get my confidence, interviewer was very helpful.

1. Find maximum level sum in Binary Tree

Easy
15m average time
85% success
0/40
Asked in companies
MAQ SoftwareSnapdeal Ltd.

You are given an arbitrary binary tree consisting of N nodes, where each node is associated with a certain value, your task is to find the maximum sum for a level in the tree.

A binary tree is a tree where every node has at most two child nodes.

Two nodes are said to be at the same level in the tree if both have equal distance from the root node.

For example, consider the following binary tree:

example

Here, max level sum is 13 for level 1(17-4) and also level 3(25-12).

Problem approach

The idea is to do a level order traversal of the tree. While doing traversal, process nodes of different levels separately. For every level being processed, compute the sum of nodes in the level and keep track of the maximum sum.

Try solving now

2. Find top k (or most frequent) numbers in a stream

Moderate
10m average time
85% success
0/80
Asked in companies
WalmartOracleFacebook

You are given an Integer array ‘ARR’ and an Integer ‘K’.


Your task is to find the ‘K’ most frequent elements in ‘ARR’. Return the elements in any order.


For Example:

You are given ‘ARR’ = {1, 2, 2, 3, 3} and ‘K’ = 2. 

The answer will {2, 3} as 2 and 3 are the elements occurring most times.
Problem approach

The idea is to store the top k elements with maximum frequency. To store them a vector or an array can be used. To keep the track of frequencies of elements creates a HashMap to store element-frequency pairs. Given a stream of numbers, when a new element appears in the stream update the frequency of that element in HashMap and put that element at the end of the list of K numbers (total k+1 elements) now compare adjacent elements of the list and swap if higher frequency element is stored next to it.

Algorithm : 
1. Create a Hashmap hm, and an array of k + 1 length.
2. Traverse the input array from start to end.
3. Insert the element at k+1 th position of the array, update the frequency of that element in HashMap.
4. Now, traverse the temp array from start to end – 1:
For very element, compare the frequency and swap if higher frequency element is stored next to it, if the frequency is same then swap is the next element is greater.
5. At last, print the top k element in each traversal of original array.

Try solving now
03
Round
Easy
Face to Face
Duration60 minutes
Interview date10 Apr 2015
Coding problem2

This round was based on DSA and questions on core subjects that I had studied throughout college.

1. Vertical Sum in a given Binary Tree

Hard
45m average time
50% success
0/120
Asked in companies
HSBCOracleSnapdeal Ltd.

Given a binary tree having a positive integer written on each of its nodes. Your task is to find the vertical sum of node values i.e. the sum of nodes that can be connected by a vertical line.

A binary tree is a tree in which each parent node has at most two children.

For example:
Consider the following Binary Tree:

sample-tree

So the final answer is
12 9 11 6
Problem approach

We need to check the Horizontal Distances from the root for all nodes. If two nodes have the same Horizontal Distance (HD), then they are on the same vertical line. The idea of HD is simple. HD for root is 0, a right edge (edge connecting to right subtree) is considered as +1 horizontal distance and a left edge is considered as -1 horizontal distance.
We can do an in-order traversal of the given Binary Tree. While traversing the tree, we can recursively calculate HDs. We initially pass the horizontal distance as 0 for root. For left subtree, we pass the Horizontal Distance as Horizontal distance of root minus 1. For right subtree, we pass the Horizontal Distance as Horizontal Distance of root plus 1.


Time Complexity : O(n*log(n))

Try solving now

2. Computer Network Question

What is TCP/IP?

Problem approach

TCP/IP stands for Transmission Control Protocol/Internet Protocol and is a suite of communication protocols used to interconnect network devices on the internet. TCP/IP is also used as a communications protocol in a private computer network (an intranet or extranet). The entire IP suite -- a set of rules and procedures -- is commonly referred to as TCP/IP. TCP and IP are the two main protocols, though others are included in the suite. The TCP/IP protocol suite functions as an abstraction layer between internet applications and the routing and switching fabric.

04
Round
Easy
HR Round
Duration30 minutes
Interview date10 Apr 2015
Coding problem1

Experience : Keep confidence and show them good communication skills. Previous round's performance also matters in this rounds

1. Basic HR Questions

1. Tell About Yourself
2. Family Background
3. Why Snapdeal?

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.

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
Business Analyst
3 rounds | 5 problems
Interviewed by Snapdeal Ltd.
1202 views
0 comments
0 upvotes
SDE - 1
3 rounds | 6 problems
Interviewed by Snapdeal Ltd.
926 views
0 comments
0 upvotes
Software Engineer
4 rounds | 7 problems
Interviewed by Snapdeal Ltd.
845 views
0 comments
0 upvotes
SDE - 1
3 rounds | 5 problems
Interviewed by Snapdeal Ltd.
984 views
1 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer
3 rounds | 7 problems
Interviewed by Optum
7873 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
4309 views
1 comments
0 upvotes