/**
 * Given a list of books and a genre, return a list of books that belong to that genre.
 */
fun searchBooks(books: List<Map<String, String>>, genre: String): List<Map<String, String>> {

    val matchingBooks = mutableListOf<Map<String, String>>() // Empty list to store the matching books

    // Loop through each book in the list
    for (book in books) {
        // Check if the book's genre matches the given genre
        if (book["genre"] == genre) {
            // Add the book to the matchingBooks list
            matchingBooks.add(book)
        }
    }

    return matchingBooks
}
/**
 * Given a list of books and a genre, return a list of books that belong to that genre.
 */
fun searchBooks(books: List<Map<String, String>>, genre: String): List<Map<String, String>> {
/**
 * Given a list of books and a genre, return a list of books that belong to that genre.
 */
fun searchBooks(books: List<Map<String, String>>, genre: String): List<Map<String, String>> {

    val matchingBooks = mutableListOf<Map<String, String>>() // Empty list to store the matching books

    // Loop through each book in the list
    for (book in books) {
        // Check if the book's genre matches the given genre
        if (book["genre"] == genre) {
            // Add the book to the matchingBooks list
            matchingBooks.add(book)
        }
    }

    return matchingBooks
}