Thoughtworks interview question

1. Adding book to library problem.