/**
 * A librarian needs to find the location of a book in the library.
 * The librarian has a map called 'bookList' where the keys are the name of the books and the values are pairs
 * representing the location of the book in the library (floor, aisle, shelf).
 *
 * You need to write a function 'findBook' that takes in the bookList map and a bookTitle as parameters.
 * The function should return the location of the book in the library as a pair (floor, aisle, shelf).
 * If the book is not found in the library, return null.
 */
fun findBook(bookList: Map<String, Triple<Int, Int, Int>>, bookTitle: String): Triple<Int, Int, Int>? {

    // Iterate over the entries in the map
    for ((title, location) in bookList) {
        // Check if the current title matches the desired book title
        if (title == bookTitle) {
            return location  // Returns the location if found
        }
    }
    return null  // Returns null if the book is not found
}
/**
 * A librarian needs to find the location of a book in the library.
 * The librarian has a map called 'bookList' where the keys are the name of the books and the values are pairs
 * representing the location of the book in the library (floor, aisle, shelf).
 *
 * You need to write a function 'findBook' that takes in the bookList map and a bookTitle as parameters.
 * The function should return the location of the book in the library as a pair (floor, aisle, shelf).
 * If the book is not found in the library, return null.
 */
fun findBook(bookList: Map<String, Triple<Int, Int, Int>>, bookTitle: String): Triple<Int, Int, Int>? {
/**
 * A librarian needs to find the location of a book in the library.
 * The librarian has a map called 'bookList' where the keys are the name of the books and the values are pairs
 * representing the location of the book in the library (floor, aisle, shelf).
 *
 * You need to write a function 'findBook' that takes in the bookList map and a bookTitle as parameters.
 * The function should return the location of the book in the library as a pair (floor, aisle, shelf).
 * If the book is not found in the library, return null.
 */
fun findBook(bookList: Map<String, Triple<Int, Int, Int>>, bookTitle: String): Triple<Int, Int, Int>? {

    // Iterate over the entries in the map
    for ((title, location) in bookList) {
        // Check if the current title matches the desired book title
        if (title == bookTitle) {
            return location  // Returns the location if found
        }
    }
    return null  // Returns null if the book is not found
}