I really like Python for these types of coding challenges. The data size is such that performance is negligible. It’s really easy to lay out your thoughts and reread the code without troubling yourself with complex syntax written for performance’s sake.
In this challenge, I use regex matching again to capture the minutes and IDs of the guards. Then I loop twice for each part of the challenge. I could have combined them into one or two loops, but again performance isn’t a priority over readability while attacking the puzzle.