Tip 1 : Practice Machine Coding round with time bound. Try to use some common design patterns like factory
Tip 2 : Go through previous experiences and practice DSA questions on Dynamic Programming, Trees and Graphs.
Tip 3 : Be prepared to share detailed past experience as in projects done, challenges faced, decisions taken etc.
Tip 1 : Add high level bullet points on your past experience along with tech stack used
Tip 2 : Attaching coding platform profiles link and GitHub profile link can help to get shortlisted at initial screening level.
It was a machine coding round.
10 to 20 minutes interviewer will explain and present a low level design question.
90 minutes to prepare design and code without using any databases.
30 minutes after this for explaining your design to interviewer and follow ups by interviewer.
Your aim is to implement a restaurant rating system. Following are the features that it should have:
- Register: Users should be able to register to give ratings for restaurants.
- Rate: Among the per-populated list of restaurants, registered users can give rating between 1 to 10. If the same user gives a new rating for the same restaurant, it should be overwritten.
- Rate with options: Along with a rating, users can add optional dish name(s) and rating description.
- List reviews: When fetching reviews for a restaurant based on filter and order by
- Filter: Ratings should be able to be filtered based on range of rating (eg. ratings between 4 (lower range) and 7 (higher range)). Lower range value Higher range value
Example testcase :
addRestaurant : "restaurant1", "restaurant2", "restaurant3"
addUser : "user1", "user2"
addRatingByUser
add dishReview, comments
Filter
Tip 1: Try to design first on paper and start implementing from bottom up approach
Tip 2: Modular design and code will help you clear the round
2 DSA questions to solve and talk out the approach along with time and space complexity analysis
Interviewer was friendly and supportive.
She helped me stay calm as I faced internet connectivity issues within the 1 hour round


Note that if Ninja reaches a particular stop with no fuel, it can still fill his tank at that stop and continue his journey ahead. Similarly, if he reaches his destination with no fuel, it is still considered to have arrived.
Given X = 10, Y = 4, ARR[Y] = {[1, 6], [2, 3], [3, 3], [6, 4]} and Z = 1
So the path followed in this case would look like this:
Ninja starts with 1L of gas.
Drives to the first gas station at position 1, using 1L of gas, then refueling with 6L of gas.
Then, drive to position 6, using 5L of gas, then refueling 4L in the current 1L of gas, making it a total of 5L of gas.
Finally, drive to the destination consuming 4L of gas.
So, Ninja made 2 refueling stops before reaching the destination. So, you need to print 2.
- We need to start from 0 location and reach to X location
- In path when we encounter any gas station there are two possibilities at each of them either fill the fuel or pass by without using gas station.
- I used recursion based approach and explored both cases for all the gas stations in the path.
- As it was exponential time solution. we discussed memorization and on which key we can build memorization.
- Also discussed priority queue based approach without writing code : keep adding to heap such that max fuel gas stations is on top and pop it when we run out of fuel at any point in time, this is greedy approach
- As we used more than half hour we moved to second question



If two rows have the same number of 1’s, return the row with a lower index.
If no row exists where at-least one '1' is present, return -1.
Input: ‘N’ = 3, 'M' = 3
'ARR' =
[ [ 1, 1, 1 ],
[ 0, 0, 1 ],
[ 0, 0, 0 ] ]
Output: 0
Explanation: The 0th row of the given matrix has the maximum number of ones.
- I discussed naive approach first that we can traverse whole 2d array to find solution in O(n*m) time
- Without coding it I directly came to optimized approach as we were tight on time left. I discussed O(n + m) approach where we travel from [0] [n - 1] and follow "move left until 1 else move down" and at last we will be at our answer when we are at last row.
- our answer will be column on which our pointer is when we are at last row.
It was Hiring Manager round where we discussed about my past experience, projects, problems faced, learning from them.
About the roles and requirements. It was more like behavior round.
More on behavior/ HR type questions
- Why Flipkart
- Why do you want to switch
- Short and long term goals
- Challenges faced during past experiences
Tip 1 : Take a day or two and try to analyze your time at current work and point down some experiences when you faced problems and learned something from it, how you approached work and people at work.
Tip 2 : Be confident and original
Tip 3 : Practice speaking out in STAR pattern for this round

Here's your problem of the day
Solving this problem will increase your chance to get selected in this company
How do you remove whitespace from the start of a string?