Netflix Cracker Sheet

2364
Aug 10, 2022

Given two strings a and b we need to add ith elements from both. Time limit 0.5secs (AFAIR). (Input size limits I do not remember)
Eg1:
a = "99"
b = "99"
ans = "1818"
Eg2:
a = "9"
b = "11"
ans = "110"
2)
Given an array of integers and an integer K, find the number of subarrays with at least K distinct integers.
Example 1:
array = [1, 2, 1, 1] and k = 2
output=2; {1,2} and {2,1} are only possibilities
Example 2:
array = [1, 2, 3, 4, 1] and k = 4
output=6; {1, 2, 3}, {1, 2, 3, 4}, {1,2,3,4,1}, {2,3,4}, {2,3,4,1} and {3,4,1} are the only possibilities. Note that {1,2,3,4,1} is valid because it still has 3 distinct integers.
3)
design a system that counts how minutes watched on particular video, number of video watched completely and Category of videos most watched.

Netflix and chill is a pretty common phrase these days. How about you share your ideas about how you'd design it if asked to do so?
Some questions to clear ambiguity :
Q. What will be the main feature of this platform?
A. Basically it'll recommend you videos at any time of the day.
Q. Who are the targeted audience?
A. People all around the world.
Q. How will audience access it?
A. Using devices like phones, laptops, TVs, etc.

Functional requirements
Users can watch videos on the platform
Like/ dislike option
View Count
Non-functional requirements
The platform should be highly available
The response time for users in different regions should be at the same level
The platform should scale while userbase is increasing
5)
Find how many people are streaming a tv show on netflix simultaneously

Reorder a linked list with all the odd indexed nodes preceeding the evens.

Comments (6)