Company: Adobe_12july
Difficulty: medium
Book Shelf Management Problem Description You're a librarian and you have to organize books. Each book has a name, genre, and a shelf number, all enclosed in curly brackets {}. Here's what you need to do: Check if the curly brackets {} in each book's information are balanced. If they are not, return false for that book. If the brackets are balanced, add the book to a stack for its shelf number. If a book's information is missing or incomplete, return -1 for that book. If a book's shelf number is more than 10, also return -1 for that book. After you've processed all the N books, you'll be given a shelf number. You need to remove the top book from the stack for that shelf and print its information. If there are no books on that shelf, print 0, if the shelf number is more than 10, print -1. Note: The categorization string may contain any printable ASCII characters, but the function should only consider the opening '{' and closing '}' brackets for determining balance. Input Format The firs