Given a list of song IDs, implement shuffle() returning a random unplayed song, play(song_id) marking it played, and reset(), in O(1) time and space
Asked in the Round 2 stage. For grading, implement one function that processes operations in order. shuffle returns an unplayed ID or None, play:<id> returns true or false, and reset returns None. Use a fixed random seed so results are reproducible. Because tracking arbitrary played IDs requires storage, interpret the target as O(1) average time per shuffle and play, with O(n) state and O(n) reset time. Explain why strict O(1) total space is not possible.
def process_song_player(song_ids, operations):