View Single Post
Old 08-01-2011, 02:11 AM   #41
Pistos
Connoisseur
Pistos could sell banana peel slippers to a Deveel.Pistos could sell banana peel slippers to a Deveel.Pistos could sell banana peel slippers to a Deveel.Pistos could sell banana peel slippers to a Deveel.Pistos could sell banana peel slippers to a Deveel.Pistos could sell banana peel slippers to a Deveel.Pistos could sell banana peel slippers to a Deveel.Pistos could sell banana peel slippers to a Deveel.Pistos could sell banana peel slippers to a Deveel.Pistos could sell banana peel slippers to a Deveel.Pistos could sell banana peel slippers to a Deveel.
 
Pistos's Avatar
 
Posts: 95
Karma: 3198
Join Date: Jul 2011
Location: Canada
Device: Kobo Touch
If you're going to do a search through any set of items for a single target, it doesn't have to be a linear search, you can do a binary search. So, in your case, that means loading up half your "possible culprit" books all at once. Check if the problem exists. If so, then take that set, cut it in half, and reapply the process -- if the problem doesn't exist, then use the other half of possible books instead. Repeat until the culprit book is found. With this algorithm, you should be able to find the culprit book among 1024 books in about 10 checks (10 cuts), not 1023 checks.
Pistos is offline   Reply With Quote