I found the following question while preparing for an interview:
You are in a very huge library that has no computer access, and you're looking for one particular book.
You look up where the book suppose to be from the card catalog, and went to shelf X to find it.
However the book is not there.
There is only one person that can answer questions, which is the libarian, but he only answers yes/no responses. Plus, his answers might not be correct.
What is your strategy for finding this book?
How would you answer this question? What methods of searching would you use?
Aug 23, 2022 6552. The time it takes for a book to arrive at your branch for pickup depends on a variety of factors. The average transit time for materials that are sitting on a library's shelf is 2-3 days (excluding weekend days), barring delays from holidays, inclement weather, or unforeseen circumstances.
The Library of Congress, founded in 1800, is a book lover's dream. With 164 million items and 1,350 kilometers of bookshelves, it's the world's largest library.
Use Binary search type questions to narrow the location of the book.
Each question should narrow the search field by half.
"Is the book on this half of the library"? (Point to the right direction).
Would work as an initial question.
You can also use The Knight and the Knave as part of your method of questioning the person. Your first 5 questions (to establish a baseline) could be about things you 'know'. You could determine his error rate from there. After that, you can use Binary Search-esque questions to determine where the book is.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With