Meesho interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Meesho
upvote
share-icon
1 rounds | 3 Coding problems

Interview preparation journey

expand-icon
Journey
I applied for the Software Engineering role through the on-campus placement drive at IIT Guwahati. The process officially began in August with a pre-placement talk that outlined Meesho's technical vision. About a week after I submitted my resume through the T&P portal, I was invited to the Online Assessment (OA).
Application story
I applied for the Software Engineering role through the on-campus placement drive at IIT Guwahati. The process officially began in August with a pre-placement talk that outlined Meesho's technical vision. About a week after I submitted my resume through the T&P portal, I was invited to the Online Assessment (OA).
Why selected/rejected for the role?
I was rejected for this role because I had already received an offer from another company, so I did not proceed with the further interview rounds.
Preparation
Duration: 3 - 4 months
Topics: Data Structures, Pointers, OOPS, System Design, Algorithms, Dynamic Programming
Tip
Tip

Tip 1: Practice at least 250 questions.

Tip 2: Practice some AI fundamentals.

Tip 3: Do at least 2 projects.

Application process
Where: Campus
Eligibility: No criteria, (Salary Package - 48 LPA)
Resume Tip
Resume tip

Tip 1: Have some projects on your resume.

Tip 2: Do not include false information on your resume.

Interview rounds

01
Round
Easy
Online Coding Test
Duration120 minutes
Interview date31 Oct 2025
Coding problem3

1. Maximum Number Of Eaten Apples

Moderate
15m average time
85% success
0/80
Asked in companies
UberAmazonMeesho

You are given two arrays, each of size ‘N’. The first array named ‘APPLES’ denotes the count of the apples produced by an apple tree on each day for N days. The second array named ‘DAYS’ represents the number of days after which these apples will become inedible.

Your task is to find the maximum number of apples you can eat if you decided to eat at most one apple per day.

Note :

1) It is also possible that the tree doesn’t grow any apples on any particular day, i.e., ’APPLES[i]’ = 0 for ‘i’th day.
2) ‘DAYS[i]’ = 0 if and only if ‘APPLES[i]’ = 0.
3) You can keep eating apples even after ‘N’ days, but keep in mind that you can eat at most one apple per day.
Problem approach

This is an Expected Value on a Tree problem. Because the process stops whenever you reach a leaf node or a node where all neighbors have already been visited, each unique path from the root (node 1) has a specific probability of occurring.
Problem Statement

Title: Expected Number of Apples Collected on a Random Walk

You are given a tree rooted at node 1. Each node i contains arr[i] apples. You start at node 1 and move to an unvisited neighbor chosen uniformly at random. The walk ends when you reach a node with no unvisited neighbors. Calculate the expected total number of apples eaten.
Solution in Steps
Step 1: Understand the Path Probability

In a tree, because you can only visit each node once, you are always moving "down" from the root toward the leaves. There is only one unique path from the root to any node u.
Let P(u) be the probability that node u is included in your walk.

For the root (node 1): P(1)=1.

For any other node u: You can only reach u if you were already at its parent v.

The probability of moving from v to u is degree(v)−11​ (excluding the edge back to v's own parent). For the root, it is degree(1)1​.

Step 2: Define the Recursive Probability

Let children(v) be the set of children of node v, and Cv​ be the number of children node v has.
The probability P(u) of visiting node u is:
P(u)=P(parent(u))×Cparent(u)​1​

Essentially, the probability of reaching any node is the product of the inverse of the number of choices made at every ancestor node along the path.
Step 3: Apply Linearity of Expectation

The expected total number of apples is the sum of the expected apples collected from each node individually.
Expected Total=i=1∑n​E[apples from node i]

Since the apples at node i are either all eaten (if visited) or none are eaten (if not visited):
E[apples from node i]=arr[i]×P(i)

Therefore:
Expected Total=i=1∑n​(arr[i]×P(i))
Step 4: Implementation (DFS)

Perform a DFS starting at node 1.

Pass the current path probability down to the children.

For each node u, calculate P(u)×arr[u] and add it to a global sum.

If a node v has k children, each child receives P(v)×k1​ as its visit probability.

Try solving now

2. Maximize Score

Moderate
10m average time
90% success
0/80
Asked in companies
OLX GroupMeeshoGoogle inc

You are given an array ‘arr’ of size ‘N’. Your task is to maximize your score by doing the following operation at most ‘K’ – times.

1. Choose an element from the start or end of the array and the value of the element to your score.
2. Remove the element from the array you have chosen in step – 1.
Note:
Initially, you have a score of zero.
Problem approach

Step 1: Invert the Problem (Minimize Skips)

It is often easier to think about this as: Total Score = (Sum of all hurdles) - (Minimum sum of hurdles skipped)
To ensure you never take more than k consecutive hurdles, you must pick at least one hurdle to skip in every window of size k+1.
Step 2: Define DP State

Let dp[i] be the minimum total value of hurdles skipped such that the constraint is satisfied up to index i, and hurdle i is definitely skipped.

For the current hurdle i to be the skip that breaks a sequence, the previous skip must have occurred at some index j such that the number of hurdles between j and i is ≤k.

This means j must be in the range [i−(k+1),i−1].

Step 3: Transitions and Optimization

The transition is:
dp[i]=arr[i]+i−(k+1)≤j
To solve this in O(n) instead of O(n⋅k):

Use a Sliding Window Minimum (Monotonic Queue/Deque).

The Deque will store indices of dp values in increasing order of their values.

For each i, the minimum value in the required range is at the front of the Deque.

Step 4: Final Calculation

After filling the dp array up to n, the minimum total skip value will be the minimum of dp[j] where j is in the last k+1 indices (since one of the last k+1 hurdles must be skipped).Final Max Score = ∑i=1n​arr[i]−min(last k+1 skip options).

Try solving now

3. Delete And Score

Moderate
20m average time
80% success
0/80
Asked in companies
MeeshoGoldman Sachs

You are given an integer array ‘arr’ of size ‘N’. You need to perform the following operation any number of times.

1- Select a element arr[i] and add it to your score. 

2- Delete every element equal to arr[i] - 1 and arr[i] + 1.

Your task is to return the maximum possible score.

For example:
You are given arr = {5, 6, 7, 8}. Then our answer will be 14. 

First select arr[1] = 6 and add it to your score. Score will be 6. Now, we also have to delete all elements equal to arr[1] - 1 = 5 and arr[i] + 1 = 7. 

In next move select arr[3] = 8. Delete it and add it to your score. Score = 14. Now, no element is left to be deleted. 

So, our final score is 14, which is the correct answer.
Problem approach

Step 1: Analyze the Contribution of Each Element

Instead of looking at the splits, look at how many times each individual element arr[i] is added to the total score.

At the very first level (the whole array), every element is added once.

Once you split the array, an element will be part of a new subarray. Every time a subarray is split again, its elements are added to the score once more.

An element arr[i] stops contributing to the score only when it ends up in a subarray of length 1.

Step 2: Recognize the Tree Structure

The splitting process can be viewed as a Binary Tree where:

The root is the entire array.

Each leaf is an individual element arr[i].

The depth of a leaf (distance from the root) represents how many times that specific element was included in a "sum" before it became a standalone array.

Total Score = ∑i=1n​(arr[i]×depth of arr[i]).

Step 3: The Maximum Score Strategy

To maximize ∑(arr[i]×depthi​), we want the elements with the largest values to have the greatest depths.

In a binary tree with n leaves, the maximum possible depth for an element is n−1.

This happens in a "skewed" tree where at every step, you peel off exactly one element and keep the rest of the array together.

To maximize the score, you should always peel off the smallest available element, keeping the larger elements together so they can be added again in the next round.

Step 4: The Final Calculation

If you always split the array into {smallest_element} and {rest_of_the_array}, the largest element will be added n−1 times, the second largest n−2 times, and so on (down to the two smallest elements, which will both have the same maximum depth in the final split).

However, the most straightforward way to calculate this without sorting is to realize that in any split strategy, the total score is simply the sum of the array at every single internal node of the partition tree. For the maximum score:

Sort the array in ascending order.

The score is ∑i=2n​(prefix_sum up to i)+arr[1].
(Alternatively, simply realizing that you want a skewed tree makes the calculation O(nlogn) due to sorting.

Try solving now

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What does the SQL function NOW() return?

Choose another skill to practice
Similar interview experiences
company logo
SDE - 1
4 rounds | 11 problems
Interviewed by Meesho
4900 views
0 comments
0 upvotes
company logo
SDE - 1
4 rounds | 9 problems
Interviewed by Meesho
3034 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 5 problems
Interviewed by Meesho
6775 views
0 comments
0 upvotes
company logo
SDE - 1
2 rounds | 2 problems
Interviewed by Meesho
1429 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
115740 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
58753 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
35391 views
7 comments
0 upvotes