i
Flipkart
Proud winner of ABECA 2025 - AmbitionBox Employee Choice Awards
Filter interviews by
The 3 Sum problem involves finding triplets in an array that sum to zero.
Sort the array to simplify finding triplets.
Use a loop to fix one element and apply two-pointer technique for the rest.
Skip duplicates to avoid repeated triplets in the result.
Example: For array [-1, 0, 1, 2, -1, -4], the triplets are [-1, -1, 2], [-1, 0, 1].
Use a two-pass approach to mark rows and columns with zeros based on existing zeros in the matrix.
Iterate through the matrix to mark rows and columns with zeros based on existing zeros
Use two arrays to keep track of which rows and columns need to be zeroed out
Perform a second pass to update the matrix based on the marked rows and columns
A parking lot app designed for blind people to easily navigate and find available parking spots.
Include voice-guided navigation to direct users to available parking spots
Use sensors to detect empty parking spaces and relay information to the app
Provide audio alerts for obstacles or other vehicles in the parking lot
Include a feature for users to easily locate their parked vehicle when returning
A parking lot app to help users find available parking spots and pay for parking.
Include a map feature to show available parking spots in real-time
Allow users to reserve parking spots in advance
Integrate payment options for users to pay for parking
Provide notifications for parking expiration or availability of nearby spots
What people are saying about Flipkart
You are provided with a string STR
of length N
. The goal is to identify the longest palindromic substring within this string. In cases where multiple palindr...
Given a string, find the longest palindromic substring with the smallest start index.
Iterate through the string and expand around each character to find palindromes
Keep track of the longest palindrome found and its starting index
Return the longest palindromic substring with the smallest start index
Given a binary tree where each node can carry a camera that monitors its parent, itself, and its immediate children, determine the minimum number of cameras needed to ...
The problem involves determining the minimum number of cameras needed to monitor all nodes in a binary tree.
Implement a function to solve the problem efficiently.
Consider the different cases where cameras can be placed to cover all nodes.
Use recursion to traverse the tree and place cameras strategically.
Optimize the solution to minimize the number of cameras needed.
Test the function with different test cases to en...
Given a string STR
consisting only of lowercase letters, your task is to modify the string by replacing the minimum characters such that the string doesn’t cont...
The task is to modify a string by replacing minimum characters to remove all palindromic substrings.
Identify palindromic substrings in the given string
Replace characters in the substrings to break the palindrome
Count the minimum number of characters replaced to remove all palindromic substrings
Given an infinite supply of coins of varying denominations, determine the total number of ways to make change for a specified value using these coins. If it's not possible to make ...
The task is to find the total number of ways to make change for a specified value using given denominations.
Use dynamic programming to solve this problem efficiently.
Create a 2D array to store the number of ways to make change for each value up to the specified value.
Iterate through each denomination and update the array accordingly.
The final answer will be stored in the last cell of the array.
Example: For N=3, D=...
Given an array/list of integers ARR
consisting of N
integers, your task is to determine the length of the longest decreasing subsequence.
A s...
Find the length of the longest decreasing subsequence in an array of integers.
Use dynamic programming to keep track of the length of the longest decreasing subsequence ending at each index.
Initialize an array to store the length of the longest decreasing subsequence for each element.
Iterate through the array and update the length of the longest decreasing subsequence for each element based on previous elements.
Ret...
Given a square chessboard of size 'N x N', determine the minimum number of moves a Knight requires to reach a specified target position from its initial position.
...Calculate minimum steps for a Knight to reach target position on a chessboard.
Use BFS algorithm to find shortest path from Knight's starting position to target position.
Consider all possible moves of the Knight on the chessboard.
Keep track of visited positions to avoid revisiting them.
Return the minimum number of moves required to reach the target position.
I appeared for an interview in Oct 2024, where I was asked the following questions.
The 3 Sum problem involves finding triplets in an array that sum to zero.
Sort the array to simplify finding triplets.
Use a loop to fix one element and apply two-pointer technique for the rest.
Skip duplicates to avoid repeated triplets in the result.
Example: For array [-1, 0, 1, 2, -1, -4], the triplets are [-1, -1, 2], [-1, 0, 1].
A parking lot app to help users find available parking spots and pay for parking.
Include a map feature to show available parking spots in real-time
Allow users to reserve parking spots in advance
Integrate payment options for users to pay for parking
Provide notifications for parking expiration or availability of nearby spots
A parking lot app designed for blind people to easily navigate and find available parking spots.
Include voice-guided navigation to direct users to available parking spots
Use sensors to detect empty parking spaces and relay information to the app
Provide audio alerts for obstacles or other vehicles in the parking lot
Include a feature for users to easily locate their parked vehicle when returning
I applied via Unstop and was interviewed in Dec 2023. There were 2 interview rounds.
Use a two-pass approach to mark rows and columns with zeros based on existing zeros in the matrix.
Iterate through the matrix to mark rows and columns with zeros based on existing zeros
Use two arrays to keep track of which rows and columns need to be zeroed out
Perform a second pass to update the matrix based on the marked rows and columns
Similar to Round 1 but more hard questions
3 coding questions were asked of moderate difficulty level
I appeared for an interview in Oct 2020.
Round duration - 75 minutes
Round difficulty - Hard
Round was scheduled in the evening within a window of two hours.
Given a singly linked list of integers, return the head of the reversed linked list.
Initial linked list: 1 -> 2 -> 3 -> 4 -> NULL
Reversed link...
Reverse a singly linked list of integers and return the head of the reversed linked list.
Iterate through the linked list and reverse the pointers to point to the previous node instead of the next node.
Use three pointers to keep track of the current, previous, and next nodes while reversing the linked list.
Update the head of the reversed linked list as the last node encountered during the reversal process.
Given a square chessboard of size 'N x N', determine the minimum number of moves a Knight requires to reach a specified target position from its initial position...
Calculate minimum steps for a Knight to reach target position on a chessboard.
Use BFS algorithm to find shortest path from Knight's starting position to target position.
Consider all possible moves of the Knight on the chessboard.
Keep track of visited positions to avoid revisiting them.
Return the minimum number of moves required to reach the target position.
Tip 1 : Your basics should be very clear about data structures and algorithms.
Tip 2 : Try to solve questions in a specific time frame. Also dry run your code with custom test cases, try to find the edge cases.
Apart from this try analyzing the time and space complexity of your solution.
Tip 3 : Take a look at editorials after solving the questions as it can give you a better approach to the problem.
Tip 4 : Don't neglect subjects like OOP's, DBMS and OS. Interviews ask few questions from here as well.
Tip 1 : not too short or too long
Tip 2 : scale up the basic technologies in resume
I appeared for an interview in Sep 2020.
Round duration - 65 minutes
Round difficulty - Medium
This online assessment comprised of 12 questions with 2 coding questions and 10 MCQs.
Coding Questions:
It was one of the most common Dynamic Programming problems: Longest decreasing sub-sequence.
It was an easy question that needed us to find out the mean, median and mode in an array.
Given an array/list of integers ARR
consisting of N
integers, your task is to determine the length of the longest decreasing subsequence.
A ...
Find the length of the longest decreasing subsequence in an array of integers.
Use dynamic programming to keep track of the length of the longest decreasing subsequence ending at each index.
Initialize an array to store the length of the longest decreasing subsequence for each element.
Iterate through the array and update the length of the longest decreasing subsequence for each element based on previous elements.
Return t...
Given a string STR
consisting only of lowercase letters, your task is to modify the string by replacing the minimum characters such that the string doesn’t con...
The task is to modify a string by replacing minimum characters to remove all palindromic substrings.
Identify palindromic substrings in the given string
Replace characters in the substrings to break the palindrome
Count the minimum number of characters replaced to remove all palindromic substrings
Round duration - 45 minutes
Round difficulty - Medium
There was only one interviewer, I was asked one coding question followed by one puzzle.
Given an infinite supply of coins of varying denominations, determine the total number of ways to make change for a specified value using these coins. If it's not possible to make...
The task is to find the total number of ways to make change for a specified value using given denominations.
Use dynamic programming to solve this problem efficiently.
Create a 2D array to store the number of ways to make change for each value up to the specified value.
Iterate through each denomination and update the array accordingly.
The final answer will be stored in the last cell of the array.
Example: For N=3, D=[1, 2...
Tip 1 : Regular practice
Tip 2 : Good command over DSA
Tip 3 : Good communication skills are also important
Tip 1 : Should be short and descriptive
Tip 2 : Team projects are helpful
I appeared for an interview before Jan 2021.
Round duration - 60 minutes
Round difficulty - Hard
This round was held on Hackerearth and had 2 questions of Medium-Hard difficulty. Both were based on concepts of DP.
The use of offline IDE was prohibited so we were supposed to code it on Hackerearth IDE itself. I was able to code the second problem well with only 3 Test Cases failing but was stuck on the first problem for quite a long time and wasn't able to pass all the major Test Cases .
Given a binary tree where each node can carry a camera that monitors its parent, itself, and its immediate children, determine the minimum number of cameras needed to...
The problem involves determining the minimum number of cameras needed to monitor all nodes in a binary tree.
Implement a function to solve the problem efficiently.
Consider the different cases where cameras can be placed to cover all nodes.
Use recursion to traverse the tree and place cameras strategically.
Optimize the solution to minimize the number of cameras needed.
Test the function with different test cases to ensure ...
You are provided with a string STR
of length N
. The goal is to identify the longest palindromic substring within this string. In cases where multiple palind...
Given a string, find the longest palindromic substring with the smallest start index.
Iterate through the string and expand around each character to find palindromes
Keep track of the longest palindrome found and its starting index
Return the longest palindromic substring with the smallest start index
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.
I appeared for an interview in Nov 2020.
Round duration - 120 minutes
Round difficulty - Medium
This was an online coding, mcq and debugging round round held on Amcat platform, there were 3 sections in the test.
1)20 MCQ questions {10 involving mathematics and the other 10 on programming fundamentals}; duration:20 mins;
you cannot navigate back to a questions after moving further, so have to answer carefully
2)debugging section- it involved 7 questions which were to be completed within 20 mins, 5 of them were very easy, each question only took almost a minute to figure out the problem with the code, last 2 questions were relatively moderate and there were errors at 3-4 sections of the entire code. I was able to solve all the questions in 15 mins
3)2 Coding questions- duration:80 mins, one was moderate on string while the other one involved dynamic programming, I was able to successfully execute all the available test cases.
Given two strings, S
and X
, your task is to find the smallest substring in S
that contains all the characters present in X
.
S = "abdd", X = "bd"
Find the smallest substring in S that contains all characters in X.
Use a sliding window approach to find the smallest window in S containing all characters of X.
Maintain a hashmap to keep track of characters in X and their frequencies.
Slide the window by moving the right pointer until all characters in X are found, then move the left pointer to minimize the window size.
Return the smallest window found.
Example: S = 'abd...
You are given a 2D matrix 'ARR' of size 'N x 3' with integers, where 'N' is the number of rows. Your task is to compute the smallest sum achievable by selecting one...
Find the smallest sum achievable by selecting one element from each row of a 2D matrix, following certain constraints.
Iterate through each row and find the minimum element that does not violate the constraints.
Keep track of the minimum sum achieved by selecting elements from each row.
Avoid selecting elements directly beneath previously selected elements.
Round duration - 45 minutes
Round difficulty - Hard
The interview started with introduction, there were two interviewers, they both introduced themselves and then asked me to introduce myself. Then we had a brief description on my projects, and they really appreciated my projects. Then as they were more concerned with DSA part, so we moved towards solving a coding problem. It was a famous rotten oranges problem with some change in language but as I haven't seen it beforehand, I wasn't able to give them an optimal approach and had to ask for some hints, but with a certain amount of help and hints, I was able to solve the problem and successfully coded it in 5 mins. Then the interviewers went for a dry run of the algorithm and tried to run it on each and every corner case, but as my algorithm was kind of bullet proof, it successfully passed all the corner cases.
Then they went for some questions on OOPS concepts involving inheritance and we had a long discussion on virtual function and runtime polymorphism. Then the interview was ended after a Q/A round that lasted for 3-4 minutes.
Given a grid containing oranges in three possible states:
Every second, any fresh orange adjac...
Given a grid with fresh and rotten oranges, determine the minimum time for all oranges to become rotten.
Create a queue to store the coordinates of rotten oranges and perform BFS to rot adjacent fresh oranges
Track the time taken to rot all oranges and return -1 if some fresh oranges remain
Handle edge cases like empty grid or no fresh oranges present
Example: For input grid = [[2,1,1],[1,1,0],[0,1,1]], the minimum time to...
Tip 1 : Try to keep yourself involved in competitive programming on regular basis {ex-Codechef, codeforces etc}
Tip 2 : brush up concepts on DSA and practice at least all questions from interviewbit and around 300 questions from GFG and Leetcode of upto intermediate level, this will help you in building your concepts and you will be quickly able to answer the questions in face to face interviews
Tip 3 : Complete some courses on data structures and algorithms and some programming languages{coding ninjas courses are preferable for valuable content}
Tip 1 : Try to keep only those things in resume on which you have very good command and you should be able to answer all of the questions(upto moderate level) related to your technical skills
Tip 2 : Mention your projects with brief description, try avoiding very high level description because some times reader might not be able to understand your work, keep it descriptive and understandable
I appeared for an interview in Oct 2020.
Round duration - 120 minutes
Round difficulty - Medium
Evening test around 5
Platform :- SHL
Environment was amazing
Given two binary trees, T and S, determine whether S is a subtree of T. The tree S should have the same structure and node values as a subtree of T.
Given two binary trees T and S, determine if S is a subtree of T with the same structure and node values.
Check if the second tree is a subtree of the first tree by comparing their structures and node values.
Use a recursive approach to traverse both trees and check for equality.
Handle cases where one tree is null or the values do not match.
Return true if S is a subtree of T, false otherwise.
You are given an N * N matrix of integers where each row and each column is sorted in increasing order. Your task is to find the positi...
Given a sorted N*N matrix, find the position of a target integer X.
Iterate over each row and column to find the target integer X
Utilize the sorted nature of the matrix to optimize the search process
Return the position of X if found, else return -1 -1
Round duration - 60 minutes
Round difficulty - Medium
1 Hour
Afternoon
You are provided with two singly linked lists containing integers, where both lists converge at some node belonging to a third linked list.
Your task is to determine t...
Find the node where two linked lists merge, return -1 if no merging occurs.
Traverse both lists to find their lengths and the difference in lengths
Move the pointer of the longer list by the difference in lengths
Traverse both lists simultaneously until they meet at the merging point
Given a Binary Search Tree (BST) and an integer 'S', your task is to find all pairs of nodes within the BST that total to 'S' and return these pairs. If no such p...
Find pairs of nodes in a BST that sum up to a given value 'S'.
Traverse the BST in-order to get a sorted list of nodes.
Use two pointers approach to find pairs with sum 'S'.
Keep track of visited nodes to avoid using the same node twice in a pair.
Round duration - 60 minutes
Round difficulty - Medium
Online Round held on Chime
You are given a binary tree of integers. Your task is to determine if it is a binary heap tree or not.
The first line of input contains an integer ‘T’ denoti...
Determine if a given binary tree is a binary heap tree or not based on certain properties.
Check if the binary tree is a complete binary tree where every level, except the last level, is completely filled and the last level is as far left as possible.
Ensure that every parent node is greater than all its children nodes, forming a max-heap.
If any node does not have a left or right child, it should be represented as -1 in ...
Given two strings S
and T
with lengths N
and M
respectively, your task is to find the "Edit Distance" between these strings.
The Edit Distance is defined as the minimum nu...
The task is to find the minimum number of operations required to convert one string into another using delete, replace, and insert operations.
Use dynamic programming to solve the problem efficiently.
Create a 2D array to store the edit distances between substrings of the two input strings.
Fill up the array based on the minimum of three possible operations: insert, delete, or replace.
The final answer will be the value at...
Tip 1 : 1 Programming Language
Tip 2 : Practice Data Structures with atleast 300 ques.
Tip 3 : CS Fundamental
Tip 1 : 1 Pager
Tip 2 : Add top 3 projects in Resume.
I appeared for an interview before Sep 2020.
Round duration - 90 Miinutes
Round difficulty - Medium
First round had MCQ + 2 coding questions. It was held in morning around 11 am. It was held on campus.
You are tasked with directing a robot from the top-left corner of an N*N matrix to a specified point (x, y), delivering a parcel. The robot is restricted to move only on flat a...
Determine if a robot can reach a specified destination in a matrix by moving only downwards or rightwards.
Start at (0,0) and move towards the destination (x, y) only downwards or rightwards.
Check if the path is clear (1) and avoid obstacles (0) while staying within matrix boundaries.
Return true if the robot can reach the destination, false otherwise.
Example: For input matrix [[1, 0, 1], [1, 1, 1], [1, 1, 5]] with desti...
Given an arbitrary array arr
consisting of N
non-negative integers where every element appears thrice except for one. Your task is to find the element in the array that appears onl...
Find the unique element in an array where every element appears thrice except for one.
Use XOR operation to find the unique element.
Iterate through the array and XOR each element to find the unique element.
The XOR operation cancels out elements that appear thrice, leaving only the unique element.
Example: arr = [2, 2, 3, 2], XOR of all elements = 3.
Example: arr = [0, 1, 0, 1, 0, 1, 99], XOR of all elements = 99.
Round duration - 90 Minutes
Round difficulty - Medium
Second Round was held in morning around 10-11 am. There was one interviewer working on his laptop. Interviewer was really helpful and first offered me water and then for a bit talked about himself.
You are tasked with implementing a class BSTIterator
, which is designed to traverse a Binary Search Tree (BST) in the inorder manner. The class must support the following op...
Implement a BSTIterator class to traverse a Binary Search Tree in inorder manner.
Implement a constructor to initialize the iterator with the root of the BST.
Implement next() and hasNext() methods to traverse the BST in inorder.
Implement prev() and hasPrev() methods to access the previous element in the inorder traversal.
Use level-order traversal format to represent the tree input.
Output the inorder traversal of the bin...
Given a binary tree and the values of two distinct nodes, determine the distance between these two nodes in the tree. The distance is defined as the minimum num...
Calculate the distance between two nodes in a binary tree.
Traverse the tree to find the paths from the root to each node
Find the lowest common ancestor of the two nodes
Calculate the distance by adding the distances from the LCA to each node
Tip 1 : Keep talking about what are you thinking
Tip 2 : Don't beat about the bush if don't know the answer just say so
Tip 1 : Only show projects you are confident about
Tip 2 : Basic Web and android projects are also fine
based on 5 interview experiences
Difficulty level
Duration
based on 2 reviews
Rating in categories
Senior Executive
2.5k
salaries
| ₹4 L/yr - ₹8 L/yr |
Operations Executive
1.9k
salaries
| ₹2.2 L/yr - ₹6.3 L/yr |
Assistant Manager
1.8k
salaries
| ₹10 L/yr - ₹18 L/yr |
Team Lead
1.6k
salaries
| ₹3.6 L/yr - ₹8.2 L/yr |
Executive
1.4k
salaries
| ₹2.2 L/yr - ₹7 L/yr |
Amazon
Myntra
Snapdeal
Meesho