/**
 * This function takes in a list of books and a genre, and returns
 * a list of book titles that belong to the specified genre.
 *
 * @param books A list of maps representing books. Each map
 * contains the keys 'title' and 'genre'.
 * @param genre The genre of books to search for.
 * @return A list of book titles that belong to the specified genre.
 */
fun searchLibraryBooks(books: List<Map<String, String>>, genre: String): List<String> {

    val titles = mutableListOf<String>()
    for (book in books) {
        if (book["genre"] == genre) {
            titles.add(book["title"]!!)
        }
    }
    return titles
}
/**
 * This function takes in a list of books and a genre, and returns
 * a list of book titles that belong to the specified genre.
 *
 * @param books A list of maps representing books. Each map
 * contains the keys 'title' and 'genre'.
 * @param genre The genre of books to search for.
 * @return A list of book titles that belong to the specified genre.
 */
fun searchLibraryBooks(books: List<Map<String, String>>, genre: String): List<String> {
/**
 * This function takes in a list of books and a genre, and returns
 * a list of book titles that belong to the specified genre.
 *
 * @param books A list of maps representing books. Each map
 * contains the keys 'title' and 'genre'.
 * @param genre The genre of books to search for.
 * @return A list of book titles that belong to the specified genre.
 */
fun searchLibraryBooks(books: List<Map<String, String>>, genre: String): List<String> {

    val titles = mutableListOf<String>()
    for (book in books) {
        if (book["genre"] == genre) {
            titles.add(book["title"]!!)
        }
    }
    return titles
}