Thoughtworks Interview Question

1. Adding book to library problem.