Phone interview: Given an array of numbers and an integer, write code that checks if there are contiguous entries in the array that add up to that integer. 1. Write code to multiply two large numbers given as strings (without using BigInteger). 2. Given an array with numbers, sort it such that all non-zeros are at the beginning of the array. 3. A person is considered a celebrity is he/she likes nobody AND everybody likes him/her. Given a set of n people and a function like(i,j), which returns true if i likes j and false otherwise, write code to find all celebrities. 4. Implement code that finds the best schedule for tasks with different duration that depend on each other. 5. System Design: Design Netflix-like streaming service
Sigiloso
Phone interview: ask if all numbers are positive, yes, use two indices, increment the left one, if sum ist too large, otherwise increment the right one. 1. Split string into smaller chunks of numbers, multiply those and piece back together as string. 2. Easier if in-place is not required, otherwise use index on left and right of the array. 3. There is at most one celebrity, with every call to like(i,j) either i or j can be eliminated as celebrity, thus you can find the celebrity in O(n). 4. Recursion war pretty obvious 5. Separating videos and recommendation services, different bandwidth for videos (storage vs compression), define REST API for video service, calculation how much space videos take up, ...