1. Design a System for a Streaming Service
For the system design interview, you are asked to design a classic streaming service like Netflix. The system should allow customers to browse TV shows and movies in the catalog, list titles by genre and other categories such as 'recently added' or 'top ten', enable customers to play videos at different resolutions on different devices, and remember the customer's play position to continue watching a movie from where they left off the day before. You are also required to outline the database schema for the system.
2. Memoize Function Calls
Implement a memoization function to cache and reuse the results of expensive function calls.
3. Factory Function for Custom Logger
Create a factory function that generates a logger with a custom prefix. The logger should prepend the provided prefix to the arguments when logging to the console.
4. Add Comma Method to String Class
Extend the JavaScript String class with an addComma method that allows adding a comma between every character of any string when called.
5. Merge n Sorted Lists
If you are given n sorted lists with an unknown value of n, how would you merge them? Discuss your approach and its complexity without coding it up.