Daily challenge for 2026-05-22
507. Find the Library Book Row
A librarian has organized books in a long row where each book has a unique identification number. The books are sorted in strictly increasing order. Given an array of book IDs books and a target ID, return the index of the book if it exists. If the book is not in the row, return -1. You must implement an algorithm with O(log n) runtime complexity.
Example:Input: books = [10, 20, 30, 40, 50], target = 30Output: 2
Run this challenge interactively in Python or JavaScript when the app loads.