Date: 30/10/2020
Position: Software Engineer
Duration: 1 hr
First 15 mins: Basic introduction and why Bloomberg?
Next 45 mins: Coding question
A TV show is "addictive" if the viewers quickly become addicted to the show and eventually finish watching the show. It can be tracked after viewing how many episodes of a show at least 70% of the viewers who watched that continued on to finish the show entirely. In other words, more that 70% of the viewers who watched the first x eposides of a show continued on to finish the entire show. The x is what we are looking for.
Assumptions:
Given a log of entries consisting of a user id, the show name and the episode number that was watched, produce the x for each show.
Sample Input:
The following function is called for each log entry
void process_log(string show, int episode, int user_id)
Expected Output:
void print_results();
My experience: There was no sample input and output given. Personally it was difficult for me to understand the question without those. Also, the task wasn't just logic implementation, but also to parse the log entries, store the data (required for result calculation) and calculate result. I couldn't solve it, got a rejection the next day.