Media.net interview experience Real time questions & tips from candidates to crack your interview

SDE - Intern

Media.net
upvote
share-icon
2 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Preparation
Duration: 8 months
Topics: Data Structures, OOPs, Algorithms, Dynamic Programming, Graphs and Graph algorithms(BFS, DFS)
Tip
Tip

Tip 1 : Regulalry particpate in contests.
Tip 2 : along with DSA prepare your CS core subjects also.
Tip 3 : Make atleast 2 personal projects on trending tech stacks.

Application process
Where: Campus
Eligibility: above 7 CGPA
Resume Tip
Resume tip

Tip 1 : Don't bluff in resume.
Tip 2 : You should have atleast 2 personal projects.

Interview rounds

01
Round
Hard
Online Coding Interview
Duration90 Minutes
Interview date26 Aug 2021
Coding problem3

It was around 7 - 8 in the evening.It consist of 3 coding question. 1 -easy, 2 - hard problems. overall it was hard coding round.

1. 0 1 Knapsack

Moderate
0/80
Asked in companies
Disney + HotstarOptumAmazon

A thief is robbing a store and can carry a maximum weight of ‘W’ into his knapsack. There are 'N' items available in the store and the weight and value of each item is known to the thief. Considering the constraints of the maximum weight that a knapsack can carry, you have to find the maximum profit that a thief can generate by stealing items.

Note: The thief is not allowed to break the items.

For example, N = 4, W = 10 and the weights and values of items are weights = [6, 1, 5, 3] and values = [3, 6, 1, 4]. Then the best way to fill the knapsack is to choose items with weight 6, 1 and 3. The total value of knapsack = 3 + 6 + 4 = 13.

Problem approach

It is the standard problem of knapsack dp.either take it or not.
code -->
int dp[n+1][c+1];
memset(dp,0,sizeof(dp));
int ans = 0;
for(int i = 1;i<=n;i++)
{
for(int j = 1;j<=c;j++)
{
if(w[i-1]>j)
{
dp[i][j] = dp[i-1][j];
}
else 
{
dp[i][j]= max(v[i-1] + dp[i-1][j - w[i-1]],dp[i-1][j]);
}
}
}
return dp[n][c];

Try solving now

2. Binary Tree Maximum Path Sum

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

You are given a binary tree with ‘N’ nodes.

Your task is to find the “Maximum Path Sum” for any path.

Note :

1. A ‘path’ is a sequence of adjacent pair nodes with an edge between them in the binary tree.
2. The ‘path’ doesn’t need to pass through the root.
3. The ‘path sum’ is the sum of the node’s data in that path. 
Problem approach

you have to solve this problem by dfs approach. firstly explore left child and then right child. and call this dfs function for root and also keep track of max ans.
code --->
int dfs(TreeNode* root,int &ans)
{
if(root==NULL)
return 0;

int lsm = dfs(root->left,ans);
int rsm = dfs(root->right,ans);
ans = max({ans,root->val,root->val + max(lsm,rsm)});
return max({root->val,root->val + max(lsm,rsm)});
}

Try solving now

3. Ninja and words magic

Moderate
30m average time
70% success
0/80
Asked in companies
BarclaysMedia.netGoogle inc

Ninja has been given a dictionary of words ‘WORDS’ of length ‘N’ and a sentence ‘SENTENCE’ consisting of words separated by a single space. Ninja has to make the ‘SENTENCE’ as small as possible by performing the below operation any number of times.

Ninja can replace a word of the ‘SENTENCE’ with a word present in the ‘WORDS’ if and only if the prefix of that word is present in the ‘WORDS’.

Note: If the word of the ‘SENTENCE’ can be replaced by more than one word present in the ‘WORDS’, then replace it with the smallest possible word present in the ‘WORDS’.

Example for all prefixes of a string:

String ‘STR’ = “abcd” 
Then all possible prefix of this ‘STR’ are:
"a", "ab", "abc", "abcd".

Note:

1. All the words in the ‘WORDS’ and the ‘SENTENCE’ contain only lower case English alphabets.
2. ‘SENTENCE’ does not have any leading and trailing spaces.

Can you help Ninja to make the ‘SENTENCE’ as small as possible by performing the given operation?.

Try solving now
02
Round
Medium
Telephonic
Duration50 Minutes
Interview date27 Aug 2021
Coding problem2

It was good there were two interviewers one was asking questions and other was analysing how i was giving answers. interviewer was good and supportive.

1. Shopping Options

Easy
0/40
Asked in companies
AmazonBNY MellonMedia.net

You are given the list of costs of pants in an array “pants”, shirts in an array “shirts”, shoes in an array “shoes”, and skirts in an array “skirts”. You are also given a budget amount ‘X’ to spend. You want to buy exactly 1 item from each list. Your task is to determine the total number of possible combinations that you can buy, given that the total amount of your purchase does not exceed your budget amount.

Try solving now

2. OS Questions

What is RAID structure in OS? What are the different levels of RAID configuration?
What is a Pipe and when it is used?
Linux based questions ->
How to find word count in a file?

Problem approach

I was not able to give proper answer of these questions as i haven't studied these things at that time.
Tip 1 : Study OS from javatpoint or gate smashers.
Tip 2 : Prepare linux concepts also for media.net

Here's your problem of the day

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

Skill covered: Programming

How do you remove whitespace from the start of a string?

Choose another skill to practice
Similar interview experiences
SDE - 1
3 rounds | 6 problems
Interviewed by Media.net
4659 views
1 comments
0 upvotes
SDE - Intern
4 rounds | 5 problems
Interviewed by Media.net
1939 views
0 comments
0 upvotes
SDE - 1
4 rounds | 6 problems
Interviewed by Media.net
0 views
0 comments
0 upvotes
SDE - Intern
3 rounds | 2 problems
Interviewed by Media.net
1367 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - Intern
3 rounds | 6 problems
Interviewed by Amazon
15605 views
4 comments
0 upvotes
company logo
SDE - Intern
4 rounds | 7 problems
Interviewed by Microsoft
15499 views
1 comments
0 upvotes
company logo
SDE - Intern
2 rounds | 4 problems
Interviewed by Amazon
10216 views
2 comments
0 upvotes