/**
 * The librarian wants to check the availability status of certain books in the library.
 * Complete the function below to iterate through the 'booksToCheck' map,
 * checking if each book is available or not based on the 'bookStatuses' map.
 * The function should return a list of books that are available.
 */
fun librarianCheckBooks(booksToCheck: Map<String, Boolean>, bookStatuses: Map<String, Boolean>): List<String> {

    val availableBooks = mutableListOf<String>()

    // Iterate through each book in the 'booksToCheck' map
    for ((book, status) in booksToCheck) {
        // Check if the book is available by checking its status in the 'bookStatuses' map
        if (book in bookStatuses && bookStatuses[book] == true) {
            // If book status is true (available), add it to the 'availableBooks' list
            availableBooks.add(book)
        }
    }

    return availableBooks
}
/**
 * The librarian wants to check the availability status of certain books in the library.
 * Complete the function below to iterate through the 'booksToCheck' map,
 * checking if each book is available or not based on the 'bookStatuses' map.
 * The function should return a list of books that are available.
 */
fun librarianCheckBooks(booksToCheck: Map<String, Boolean>, bookStatuses: Map<String, Boolean>): List<String> {
/**
 * The librarian wants to check the availability status of certain books in the library.
 * Complete the function below to iterate through the 'booksToCheck' map,
 * checking if each book is available or not based on the 'bookStatuses' map.
 * The function should return a list of books that are available.
 */
fun librarianCheckBooks(booksToCheck: Map<String, Boolean>, bookStatuses: Map<String, Boolean>): List<String> {

    val availableBooks = mutableListOf<String>()

    // Iterate through each book in the 'booksToCheck' map
    for ((book, status) in booksToCheck) {
        // Check if the book is available by checking its status in the 'bookStatuses' map
        if (book in bookStatuses && bookStatuses[book] == true) {
            // If book status is true (available), add it to the 'availableBooks' list
            availableBooks.add(book)
        }
    }

    return availableBooks
}