i
Snapdeal
Filter interviews by
Find the row with maximum number of 1's in a matrix of 0's and 1's.
Start from the top right corner of the matrix
If the current element is 1, move left in the same row
If the current element is 0, move down to the next row
Repeat until you reach the bottom left corner of the matrix
A program to check if a number is a palindrome or not.
Convert the number to a string
Reverse the string
Compare the reversed string with the original string
If they are the same, the number is a palindrome
Tree traversals are methods used to visit each node in a tree data structure.
Inorder traversal: Visit left subtree, then root, then right subtree. Example: 1. Left -> Root -> Right
Preorder traversal: Visit root, then left subtree, then right subtree. Example: 1. Root -> Left -> Right
Postorder traversal: Visit left subtree, then right subtree, then root. Example: 1. Left -> Right -> Root
Codes for Post-Order, In-Order, and Level-Order Traversal of a binary tree.
Post-Order Traversal: Left subtree, Right subtree, Root
In-Order Traversal: Left subtree, Root, Right subtree
Level-Order Traversal: Visit nodes level by level, from left to right
Intersection of 2 linked lists
Traverse both lists and compare each node to find the intersection
Use a hash set to store visited nodes and check for intersection
Calculate the length of both lists and adjust the starting point for comparison
To check if a linked list has a loop, we can use the Floyd's cycle-finding algorithm.
Use two pointers, one moving at twice the speed of the other
If there is a loop, the fast pointer will eventually catch up with the slow pointer
If the fast pointer reaches the end of the list, there is no loop
Left view of a tree shows the nodes visible when viewed from the left side.
Left view of a tree is the nodes that are visible when looking at the tree from the left side.
It includes the leftmost node at each level of the tree.
Example: For a tree with root node A and left child B, the left view would be [A, B].
To find the Kth element from the end of a linked list, we can use the two-pointer approach.
Initialize two pointers, 'fast' and 'slow', pointing to the head of the linked list.
Move the 'fast' pointer K steps ahead.
Move both 'fast' and 'slow' pointers one step at a time until 'fast' reaches the end of the linked list.
The 'slow' pointer will be pointing to the Kth element from the end.
The answer describes how to check if a linked list is a palindrome or not.
Traverse the linked list and store the values in an array
Compare the elements of the array from both ends to check for palindrome
Alternatively, use two pointers to traverse the linked list, one slow and one fast, and reverse the first half of the list while traversing
The boundary of a tree refers to the outermost edges of the tree canopy or the perimeter of the tree's root system.
The boundary of a tree is defined by the outermost branches and leaves of the tree canopy.
The root system of a tree also contributes to its boundary, with roots extending outward from the trunk.
The boundary of a tree can be influenced by factors such as soil type, available nutrients, and competition from ...
Snapdeal interview questions for popular designations
The Lowest Common Ancestor (LCA) of a binary tree can be found in place using a recursive approach.
Start from the root node and recursively check if both nodes are present in the left and right subtrees.
If one node is found in the left subtree and the other in the right subtree, then the current node is the LCA.
If both nodes are found in the left subtree, recursively search for the LCA in the left subtree.
If both nodes...
Knapsack and coin change problems are classic dynamic programming problems.
Knapsack problem involves maximizing the value of items in a knapsack without exceeding its capacity.
Coin change problem involves finding the minimum number of coins needed to make a certain amount of change.
Both problems can be solved using dynamic programming techniques.
Examples: 0/1 Knapsack, Fractional Knapsack, Coin Change with limited coin
Find the maximum product of three numbers in an array.
Sort the array in ascending order.
Multiply the last three numbers in the sorted array to get the maximum product.
If there are negative numbers in the array, consider multiplying the two smallest negative numbers with the largest positive number.
I am a highly motivated and experienced professional with a strong background in project management and team leadership.
Over 10 years of experience in managing complex projects and leading cross-functional teams
Proven track record of delivering projects on time and within budget
Strong communication and interpersonal skills, able to effectively collaborate with stakeholders at all levels
Expertise in implementing project...
I would address the situation by communicating with my manager and finding a solution together.
Initiate a conversation with the manager to understand their expectations and concerns
Express your own concerns and feelings respectfully
Propose alternative approaches or suggestions
Seek a compromise or find common ground
Maintain open and honest communication throughout the process
Balancing academics, extracurricular activities, and part-time job
Juggling multiple responsibilities
Time management challenges
Prioritizing tasks effectively
Get interview-ready with Top Snapdeal Interview Questions
Circular linked list meeting point and proof
To find the meeting point in a circular linked list, use Floyd's Tortoise and Hare algorithm
Start with two pointers, one moving at twice the speed of the other
When they meet, reset one pointer to the head and move both at the same speed until they meet again
The meeting point is the start of the loop in the linked list
Reverse a linked list in chunks of k nodes
Break the linked list into chunks of size k
Reverse each chunk individually
Connect the reversed chunks back together
Printing the left view of a tree involves printing the leftmost nodes at each level of the tree.
Traverse the tree level by level using BFS or DFS
At each level, print the first node encountered
Continue this process until all levels are covered
Check if the decimal of a dynamically generated number is divisible by 3 based on the left side of the previous number.
Generate new number by adding 0 or 1 to the left side of previous number
Check if the decimal of the new number is divisible by 3
Print 'YES' if divisible by 3, 'NO' otherwise
Binary search in rotated sorted array involves finding a target element efficiently.
Identify the pivot point where the array is rotated
Determine which half of the array the target element lies in
Apply binary search in the appropriate half
Binary search in a biotonic sorted array involves finding a target value in an array that first increases and then decreases.
Start by finding the peak element in the array to determine the increasing and decreasing halves.
Perform binary search on both halves separately to find the target value.
Example: Array 12345XXXXX2, target value 2. Peak element is 5, search left half (12345) and then right half (5432) for the targ
Find the distinct pair in two arrays where all elements are same except one.
Iterate through both arrays and compare elements at each index.
If elements are not equal, those are the distinct pair.
Handle edge cases like empty arrays or arrays with different lengths.
The coin change problem in dynamic programming involves finding the minimum number of coins needed to make a certain amount of change.
Start by defining the problem - given a set of coin denominations and a target amount, find the minimum number of coins needed to make the target amount.
Use dynamic programming to build up solutions for smaller subproblems and eventually solve the main problem.
Consider the base case wher...
Group by is used to group rows that have the same values into summary rows. Having is used to filter groups based on a specified condition.
Group by is used with aggregate functions like COUNT, SUM, AVG, etc.
Having is used to filter groups based on conditions after the grouping has been done.
Example: SELECT department, COUNT(*) FROM employees GROUP BY department HAVING COUNT(*) > 5;
My strengths include strong communication skills and attention to detail. My weaknesses include a tendency to overthink and difficulty saying no.
Strengths: strong communication skills
Strengths: attention to detail
Weaknesses: tendency to overthink
Weaknesses: difficulty saying no
Top trending discussions
Some of the top questions asked at the Snapdeal interview -
The duration of Snapdeal interview process can vary, but typically it takes about less than 2 weeks to complete.
based on 32 interviews
Interview experience
based on 645 reviews
Rating in categories
Gurgaon / Gurugram
2-7 Yrs
Not Disclosed
Assistant Manager
103
salaries
| ₹0 L/yr - ₹0 L/yr |
Category Manager
93
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Executive
89
salaries
| ₹0 L/yr - ₹0 L/yr |
Deputy Manager
59
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Software Engineer
49
salaries
| ₹0 L/yr - ₹0 L/yr |
Flipkart
Amazon
Meesho
eBay