Validate checkout and return logs

0
Remix

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.

MetaTechnical phone screenLast asked Sep 2025
No answer yet. Write the first one; the best answer gets endorsed.