← Questions
Validate checkout and return logs
0
I was asked this
No reports yet. Sign in to say where you were asked it.
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 official answer yet. Write yours on the right and run it.
Nothing published yet.
Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding
