Validate checkout and return logs
Given a log of events per book, each a checkout or a return (a true/false flag), check that every book's events alternate correctly: a book must be checked out before it can be returned, and it cannot be checked out twice in a row. Report which books have invalid histories.
No answer yet. Write the first one; the best answer gets endorsed.
