Solve library coding tasks in Python
Company: Meta
Role: Data Engineer
Category: Coding & Algorithms
Difficulty: Medium
Interview Round: Technical Screen
Implement the following Python tasks:
1) Given a list of (category, points) for books, choose up to 3 books with all different categories to maximize total points; return the maximum achievable points.
2) Given a dictionary mapping library_location -> list_of_people and a collection of closed locations, return a new dictionary containing only open locations and their associated people.
3) Given an ordered list of log entries (book_id, action) where action is 'checkout' or 'return', validate the sequence: return False if a book is checked out twice in a row without a return, or returned when it is not currently checked out; otherwise return True.
Quick Answer: This question evaluates proficiency in Python coding and algorithmic problem-solving, focusing on list and dictionary manipulation, state-sequence validation, and selection/optimization across categories.