Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Disney + Hotstar interview experience Real time questions & tips from candidates to crack your interview

SDE - 1

Disney + Hotstar
upvote
share-icon
3 rounds | 6 Coding problems

Interview preparation journey

expand-icon
Journey
My journey started in class 12th, and my teacher guided me to participate in the coding competitions hosted by CodeChef. After that, I started participating in them and developed a habit of doing coding questions.
Application story
I was very excited to hear that Hotstar is coming to our campus for hiring. I always wanted to join Hotstar, so I started preparing for the interview. Then, the interviews started with two rounds of technical and 1 HR round.
Why selected/rejected for the role?
I was selected because I was ready for all sorts of questions as I had prepared well for the interviews.
Preparation
Duration: 2 months
Topics: Data Structures, Algorithms, OOPS, Operating System, Database Management, C++, or Java (proficient in anyone) Computer Networks.
Tip
Tip

Tip 1 : I would suggest practicing as many questions on data structures and algorithms as you can because it is the question practice that would help you in building your concepts strong. I practiced a lot of questions on InterviewBit and completed all modules of data structures and algorithms because there you can find the recent interview questions that you should know. 
Tip 2 : If you have time for your interviews, I would recommend going through Leetcode as it has a good variety of questions sorted on topic wise difficulty level where you can try to solve at least 20-30 questions for each data structure and algorithm. Moreover, you should regularly participate in the weekly contests happening there so that you could know about your weak areas to improve.
Tip 3 : Along with coding you should be clear about some basic concepts of Operating systems and Databases that would help in your interviews. One more thing is that do some good research about the company's goal and vision and be prepared to ask some company-related queries that show your interest in the company.

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

Tip 1 : Your Resume should consist of mainly skills, projects, and achievements. Projects would play a crucial part in your interview and you should have at least one most relevant and good project that shows how strong your concepts are in development. 
Tip 2 : The most important tip is that never lie on your resume and like If you have worked upon some technology for the project part only and don't know the proper depth you could write basics only in your resume.

Interview rounds

01
Round
Medium
Online Coding Test
Duration120 minutes
Interview date1 Dec 2021
Coding problem3

The round consisted of 3 coding questions, and the test was conducted on the Mettl platform. There was no sectional time limit for the coding questions. Every student randomly got three coding questions and got different sets of questions. The test was online with audio and video both on for continuous monitoring.

1. Median in a stream

Hard
50m average time
50% success
0/120
Asked in companies
Disney + HotstarAmazonMakeMyTrip

Given that integers are read from a data stream. Your task is to find the median of the elements read so far.

Median is the middle value in an ordered integer list. If the size of the list is even there is no middle value. So the median is the floor of the average of the two middle values.

For example :
[2,3,4] - median is 3.
[2,3] - median is floor((2+3)/2) = 2.


Problem approach

The mean was easy to compute, calculating the sum of the entire array, then I sorted the array for median and checked the size of the array. If the size was odd, I returned the middle element; else, I returned the average of the two middle elements. I maintained a frequency array for mode and returned the lowest element with maximum frequency.

Try solving now

2. N-th Term Of GP

Easy
15m average time
90% success
0/40
Asked in companies
MicrosoftDisney + HotstarPaytm (One97 Communications Limited)

You are given the first term (A), the common ratio (R) and an integer N. Your task is to find the Nth term of the GP series.

The general form of a GP(Geometric Progression) series is A, A(R), A(R^2), A*(R^3) and so on where A is the first term of GP series

Note :

As the answer can be large enough, return the answer modulo 10^9 + 7.

Problem approach

I used the setprecision() method to round off the nth gp number.

Try solving now

3. Dice Throws

Hard
35m average time
65% success
0/120
Asked in companies
MicrosoftDisney + HotstarShareChat

You are given D dice, each having F faces numbered 1 to F, both inclusive. The task is to find the possible number of ways to roll the dice together such that the sum of face-up numbers equal the given target S.

Note :
As the answer can be large, return your answer modulo 10^9  + 7.
Follow Up :
Can you solve this using not more than O(S) extra space?
Problem approach

I used DP to solve this problem, with the Number of dice being directly used as the row index and the sum being the column index. In the end, I returned the last element of the DP table.

Try solving now
02
Round
Medium
Video Call
Duration70 minutes
Interview date1 Dec 2021
Coding problem2

This round was based on data structures and some discussion regarding the projects. The interviewer was very calm and listened very carefully to the solutions. There was a lot of discussion on my projects, and the interviewer was very interested in knowing about the workflows of my projects.

1. Check Identical Trees

Moderate
20m average time
85% success
0/80
Asked in companies
MicrosoftDisney + HotstarHike

You are given two binary trees with 'n' and 'm' nodes respectively.


You need to return true if the two trees are identical. Otherwise, return false.


Example:
For the trees given below:- 

example

The given trees are identical as:-
1. The number of nodes in both trees is the same. 
2. The number of edges in both trees is the same. 
3. The data for root for both the trees is the same i.e 5. 
4. The data of root -> left (root’s left child) for both the trees is the same i.e 2.
5. The data of root -> right (root’s right child) for both the trees is the same i.e 3.
6. The data of root -> right -> left ( left child of root’s right child) for both the trees is the same i.e 6.
7. Nodes with data 2 and 6 are the leaf nodes for both the binary trees. 
Problem approach

I solved the question with simple recursion by checking every node and calling the left and right subtree.
Then, the interviewer asked me to optimize.
I explained to him then that if we have to check their identity, we must traverse both trees fully.
He was satisfied with the explanation.

Try solving now

2. Distinct Subsequences

Moderate
10m average time
80% success
0/80
Asked in companies
UberGoogleMicrosoft

You have been given string 'S' of length 'N' that may contain duplicate alphabets. Your task is to return the count of distinct subsequences of it.

For example:

For the given string “deed” :
The possible subsequences are {“”}, {“d”}, {“e”}, {“de”}, {“e”}, {“de”}, {“ee”}, {“dee”}, {“d”}, {“dd”}, {“ed”}, {“ded”}, {“ed”}, {“ded”}, {“eed”} and {“deed”}.

As, {“d”}, {“e”}, {“de”}, {“ed”} and {“ded”} are repeated. 

The distinct subsequences are {“”}, {“d”}, {“e”}, {“de”}, {“ee”}, {“dee”}, {“dd”}, {“ed”}, {“ded”}, {“eed”} and {“deed”}

Thus, the output will be 11. 

Note:

As the answer can be large, return your answer modulo 10^9  + 7.  
Problem approach

I solved this question using recursion and map. I made two recursion calls, one for including the element and one for excluding the element, and then after reaching the end of the array, I pushed the subsequence to the resultant vector. I also checked for duplicates using the map.
The interviewer was satisfied with this approach after I explained the workflow to him and that since we want all the subsequences, we need to use recursion.

Try solving now
03
Round
Easy
HR Round
Duration40 minutes
Interview date1 Dec 2021
Coding problem1

This was an HR/Coding round and was the final one. The coding question was to find the nth node from the end of the linked list, similar to the one asked in the previous round. The interview started with 2-3 HR questions. After I answered all of them, I seriously discussed my projects, like why you chose this project, what its advantages are, and how it solved the existing problem. I answered all the project-related queries very calmly, and he was satisfied.

1. Basic HR Questions

What do you expect from this internship program?

Where do you see yourself shortly?

What are your weaknesses?

What do you know about the company and the work culture here?

Problem approach

Tip 1: I answered the first question like this: I expect constant learning and growth from this internship and want to contribute something to improving people's standards in the technical world. You should always be clear about your goal and how it would help the company, and you grow as an engineer.
Tip 2: For the second question, I answered this by breaking the intervals and telling my exact plan that for the first 2-3 years, I want to become such an expert in my field that If there is any problem related to that in the company, I would be the first person to be approached and in later years, I want to explore the field of being a manager whose work is to advise on to how to lead any real-time project.
Tip 3: For the weaknesses, the tip is that one should always tell their weaknesses, but that should also not be the case when you start telling a lot of your weaknesses. You should tell only 1-2 weaknesses that are too irrelevant to the job description so that your weakness also seems to be your strength to the interviewer.
Tip 4: Do a thorough research of the company and ask some relevant questions if given a chance, which gives a good impression of yours. Also, have an in-depth knowledge of your project because that would be asked in almost every round.

Here's your problem of the day

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

Skill covered: Programming

Which type of comments is used to comment on single lines of Java code?

Choose another skill to practice
Start a Discussion
Similar interview experiences
SDE - 1
3 rounds | 5 problems
Interviewed by Disney + Hotstar
0 views
2 comments
0 upvotes
SDE - 1
2 rounds | 4 problems
Interviewed by Disney + Hotstar
540 views
0 comments
0 upvotes
SDE - 1
3 rounds | 5 problems
Interviewed by Disney + Hotstar
613 views
0 comments
0 upvotes
SDE - 1
3 rounds | 5 problems
Interviewed by Disney + Hotstar
393 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
SDE - 1
5 rounds | 12 problems
Interviewed by Amazon
105388 views
24 comments
0 upvotes
company logo
SDE - 1
4 rounds | 5 problems
Interviewed by Microsoft
50275 views
5 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by Amazon
31308 views
6 comments
0 upvotes