Given an array of book objects, where each object contains a unique book identifier `bookId` and a boolean indicating its availability `isAvailable`, implement a function to check if a book exists and its availability. The function should return a boolean array where the first element indicates the existence of the book and the second element indicates its availability.
Explanation: Book with id 2 exists and is not available
Analyze constraints and compute optimal solutions step-by-step.
No dry run loaded.
🚀 Practice this problem
Run code, get AI hints & track streak