i
Snapdeal
Filter interviews by
2 medium level leet code question.
Top trending discussions
The winner leetcode problem involves finding the candidate with the most votes in an election scenario.
Iterate through the list of candidates and keep track of their votes
Return the candidate with the highest number of votes
Example: Input - ['Alice', 'Bob', 'Alice', 'Charlie', 'Bob'], Output - 'Alice'
There was only two coding questions in 50 minutes interview
Coding round has two questions ranging in medium -hard level leetcode questions
Longest Common Subsequence is the longest sequence of characters that appear in the same order in both strings.
Use dynamic programming to solve this problem efficiently.
Create a 2D array to store the lengths of longest common subsequences.
Iterate through the strings to fill the array and find the longest common subsequence.
The largest area in a histogram refers to the rectangle with the maximum area that can be formed within the histogram bars.
Identify the largest rectangle that can be formed by considering each bar as a potential height and calculating the area based on the width of the rectangle.
Use a stack data structure to efficiently find the largest area in a histogram by keeping track of the indices of the bars in non-decreasing o...
It had 9 uqestions , one problem solving , one SQL , one API and 6 mcq
Easy assignment , if you hav eOOps knowledge you can do it
DSA - 3 Coding Questions
I applied via Campus Placement and was interviewed before Oct 2022. There were 2 interview rounds.
Design a social networking platform with features like user profiles, news feed, messaging, and photo sharing.
Create user profiles with customizable information and privacy settings
Implement a news feed algorithm to display relevant content to users
Include messaging functionality for private communication between users
Allow users to share photos and videos on their profiles and in posts
I applied via Naukri.com and was interviewed in Oct 2023. There were 2 interview rounds.
Leetcode medium question
I appeared for an interview before Dec 2020.
Round duration - 120 minutes
Round difficulty - Medium
This was a 2 hour round consisting of 5 mcqs and 2 codes. The mcqs were pretty much simple based on DS, DBMS, OS, OOP, and C.
Consider 'n' carrots numbered from 1 to 'n' and 'k' rabbits. Each rabbit jumps to carrots only at multiples of its respective jumping factor Aj (i.e., Aj, 2Aj, 3Aj, ...), for all ra...
Calculate uneaten carrots by rabbits with specific jumping factors.
Iterate through each carrot and check if any rabbit jumps on it.
Use the jumping factors to determine which carrots are eaten.
Subtract the eaten carrots from the total to get the uneaten count.
Given an array of integers ARR
of size N, consisting of 0s and 1s, you need to select a sub-array and flip its bits. Your task is to return the maximum count of 1s that can b...
Given an array of 0s and 1s, find the maximum count of 1s by flipping a sub-array at most once.
Iterate through the array and keep track of the maximum count of 1s obtained by flipping a sub-array.
Consider flipping a sub-array from index i to j by changing 0s to 1s and vice versa.
Update the maximum count of 1s if the current count after flipping is greater.
Return the maximum count of 1s obtained by flipping a sub-array
Round duration - 60 minutes
Round difficulty - Medium
Started with a brief discussion on my projects and internships. A thorough discussion on whichever languages, frameworks I had used in my projects. Followed by discussion on coding questions. Apart from the codes there were some questions on OS, process stack, heap memory in Java, Garbage collection, OOP principles and comparison based sorting
Given an array ARR
of size N
, your objective is to determine the sum of the largest and smallest elements within the array.
Can you achie...
Find sum of maximum and minimum elements in an array with least number of comparisons.
Iterate through the array and compare each element with current maximum and minimum to update them.
Initialize max as smallest possible value and min as largest possible value.
Return the sum of max and min after iterating through the array.
Given a Binary Tree and one of its leaf nodes, invert the binary tree by following these guidelines:
• The given leaf node becomes the root after the inversion. • F...
Invert a binary tree based on a given leaf node as the root.
Start by finding the leaf node in the binary tree.
Move the left child of the leaf node to the right side of the leaf node.
Make the parent of the leaf node the left child of the leaf node.
Repeat the process for each test case.
Return the inverted binary tree in level order format.
Round duration - 60 minutes
Round difficulty - Medium
Questions based on programming, DBMS and puzzles were asked in this round.
Given an array ARR
consisting of non-negative integers, rearrange the numbers to form the largest possible number. The digits within each number cannot be changed.
Rearrange the array elements to form the largest possible number by concatenating them.
Sort the array elements in a custom way where the concatenation of two numbers results in a larger number.
Use a custom comparator function while sorting the array elements.
Convert the sorted array elements to a single string to get the largest possible number.
Indexing in databases is a technique used to improve the speed of data retrieval by creating a data structure that allows for quick lookups.
Indexes are created on columns in a database table to speed up the retrieval of rows that match a certain condition.
They work similar to the index in a book, allowing the database to quickly find the relevant data without having to scan the entire table.
Examples of indexes include ...
B+ Trees are advantageous in database management systems due to their ability to efficiently store and retrieve data.
B+ Trees have a high fanout, allowing for more keys to be stored in each node, reducing the height of the tree and improving search performance.
B+ Trees are balanced trees, ensuring that operations like search, insertion, and deletion have a predictable time complexity of O(log n).
B+ Trees are optimized ...
Round duration - 45 minutes
Round difficulty - Medium
Puzzles and HR based questions were asked in this round.
He asked questions like : what are my career goals, what do you look forward to in a boss , how do you see yourself in 5 years ,etc etc .
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.
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
based on 1 interview
Interview experience
Assistant Manager
104
salaries
| ₹4 L/yr - ₹12 L/yr |
Category Manager
89
salaries
| ₹6.9 L/yr - ₹21 L/yr |
Senior Executive
88
salaries
| ₹2.8 L/yr - ₹6.6 L/yr |
Deputy Manager
66
salaries
| ₹5.5 L/yr - ₹12 L/yr |
Senior Software Engineer
49
salaries
| ₹12 L/yr - ₹28 L/yr |
Flipkart
Amazon
Meesho
eBay