Audiobook Recommendation System
Given a log of timestamped audiobook completion events, implement a recommendation system that analyzes customer listening patterns to suggest what a user should listen to next based on common book sequences across all customers.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Late October, 2026
Given a log of “audiobook completed” events, write code to implement an audiobook recommendation system. The recommendation system should essentially answer the question, "What should I listen to next?" You should determine this based on the listening patterns found in the "audiobook completed" events log. For example, if many customers listened to BookA followed by BookB, then given BookA as input, the recommendation system should return BookB. example logs: logs = ''' 2025-08-09T03:25:11Z,Customer1,BookA 2025-08-09T04:10:50Z,Customer2,BookB 2025-08-09T12:01:24Z,Customer2,BookC 2025-08-09T15:33:49Z,Customer3,BookB 2025-08-10T07:54:35Z,Customer1,BookB 2025-08-10T08:00:08Z,Customer4,BookD 2025-08-10T11:29:31Z,Customer3,BookE 2025-08-10T23:45:00Z,Customer5,BookF 2025-08-10T23:51:20Z,Customer6,BookB 2025-08-11T09:05:16Z,Customer1,BookC 2025-08-11T20:12:57Z,Customer3,BookA 2025-08-11T20:59:32Z,Customer7,BookB '''
Hello Interview Premium
Your account is free and you can post anonymously if you choose.