Question bank › Binary Search
Dsa Binary Search Medium

Book Availability Check

You are given a sorted list of ISBN numbers that represent available books in a library. A user provides an ISBN number and you need to determine if the book is available in the library. Implement a function that reads the list of ISBNs and the user's ISBN, then outputs 'Available' or 'Not Available'. Input Format: - The first line contains an integer N, the number of ISBN numbers. - The second line contains N space-separated integers representing the sorted ISBN numbers. - The third line contains a single integer ISBN to check. Output Format: - Output 'Available' if the ISBN exists in the list, otherwise 'Not Available'. Example: Input: 5 9780134685991 9780134757598 9780134757635 9780134758250 9780134758533 9780134757635 Output: Available

Key concepts

binary_searcharrayssorting

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.