Media.net | SDE 2 | Interview Experience
Summary
I, a candidate with 3 years of experience, interviewed for an SDE 2 position at Media.net. The process included rounds on DSA, CS fundamentals, and Machine Coding/Low-Level Design, culminating in a selection for the next round.
Full Experience
A bit about me & how i got opportunity - working at flipkart with 3 YOE, i got contacted by a 3rd party recruiter who was hiring for media.net
As you all know that going till the end media.net interview process is not everyone's cup of tea, cause they ask CP and very hard system design questions.
so let's start with the rounds.
There was no OA for me.
Round - 1, DSA i knew that media.net usually asks CP so i was prepared for it
Interviewer started with basic CS fundamentals, OS question - if you are given one core and a process how will execute it parallely? Basically he wanted to ask about context switching
Networking Question - when you type something on browser, what happens then?
DBMS question - query the second highest salary from employee table. Did it using subquery concept
DSA question - running code was expected for this.
Infinite number of pool balls are available. Ball could be any of 26 distinct colors.
Balls are arranged in a grid of n * m.
Coach wants to replace some coloured balls with other coloured balls (from a set of infinite pool balls, no internal rearrangements for initial configuration) such that :
A) Each row should have at most two distinct coloured balls
B) No two adjacent balls should be of the same color (left-right & top-bottom)
You need to make minimum number of replacements while satisfying coach's two criteria :
Constraints
Limits: n,m <= 100
Test Cases :
1.
Case:
n = 3, m = 4
RRRR
BBBB
WWWW
Ans:
6
RBRB
BRBR
RWRW
2.
Case:
n = 3, m = 3
RBR
RBR
WWW
Ans:
4
RBR
BRB
WBW
was able to complete the solution within an hour and ran some test cases.
Verdict: Selected (got the feedback same day and next round was scheduled)
Round - 2, Machine Coding + LLD this was 90 mins round and it went upto 2hr 15min for me this was divided into 4 phases, design, code, cover uts/edge cases, demo of code
i was asked to Build a Calendar application. he asked me to come up with requirements i came up with some and we discussed more requirements
1. user should be able to add events
2. user should be able to edit events
3. user should be able to accept/reject the event
4. user can have multiple events at same time
5. user should be able to see all the events
6. user should be able to see all the details for a event
7. user should be able to delete the event
after these many requirements he asked me to add more, i was like are you fr? within these time bounds it won't even possible to cover above requirements only.
then spend some time for design like entities, services and other classes etc. once we were aligned he asked me write code.
i wrote the code in python. i was able to cover most of the functionalities except edit event. which i later told him how will i implement the edit event functionality using builder design pattern and he asked how you will handle add/remove participants from event i answered it can be achieved using passing one extra variable. while running the edge cases some error came and i was able to debug and run the code perfectly. As time got over so interviewer spent some extra time to cover more edge cases and then we went through the demo of code. Alot of cross questions was there and i had to point out how will my code will be able to extend the functionality.
Surprise question He asked me about how can you make sure only one instance of a service class is being used in whole application? i answered that we can achieve this using singleton design pattern. then i talked about all 3 implementation of singleton and then he asked me to write code for double-check variation and i wrote the pseudo code for that.
And later he asked me to zip the code and send him.
*will update if i get any update although i doubt it as i couldn't complete all mentioned functionalities and when we were discussing he expected more functionalities,
Interview Questions (6)
OS: Parallel Execution with One Core
If you are given one core and a process, how will you execute it parallely? The interviewer wanted to ask about context switching.
Networking: What Happens When You Type in Browser?
When you type something on a browser, what happens then?
DBMS: Second Highest Salary
Query the second highest salary from employee table.
Minimum Replacements for Pool Ball Grid
Infinite number of pool balls are available. Ball could be any of 26 distinct colors. Balls are arranged in a grid of n * m.
Coach wants to replace some coloured balls with other coloured balls (from a set of infinite pool balls, no internal rearrangements for initial configuration) such that : A) Each row should have at most two distinct coloured balls B) No two adjacent balls should be of the same color (left-right & top-bottom)
You need to make minimum number of replacements while satisfying coach's two criteria :
Constraints Limits: n,m <= 100
Test Cases : 1. Case: n = 3, m = 4 RRRR BBBB WWWW Ans: 6 RBRB BRBR RWRW 2. Case: n = 3, m = 3 RBR RBR WWW Ans: 4 RBR BRB WBW
Design and Build a Calendar Application
I was asked to Build a Calendar application. I came up with the following requirements, which we discussed further: 1. user should be able to add events 2. user should be able to edit events 3. user should be able to accept/reject the event 4. user can have multiple events at same time 5. user should be able to see all the events 6. user should be able to see all the details for a event 7. user should be able to delete the event. I then spent time on the design (entities, services, classes) and wrote the code in Python, covering most functionalities except 'edit event'. I explained how I would implement 'edit event' using the builder design pattern and how to handle adding/removing participants.
Singleton Design Pattern Implementation
How can you make sure only one instance of a service class is being used in the whole application? I answered that this can be achieved using the singleton design pattern. We discussed all three implementations of singleton, and I was asked to write pseudo code for the double-check variation.
Preparation Tips
I prepared for competitive programming, anticipating the type of questions Media.net typically asks.