/**
 * Given a set of existing books in the library and a list of new books,
 * add the new books to the library.
 *
 * @param libraryBooks Set containing the existing books in the library.
 * @param newBooks List containing the new books to be added.
 * @return Updated set of books in the library.
 */
fun addBooksToLibrary(libraryBooks: MutableSet<String>, newBooks: List<String>): MutableSet<String> {

    // Convert the list of new books to a set
    val newBooksSet = newBooks.toSet()

    // Iterate over each book in the new books set
    for (book in newBooksSet) {
        // Check if the book is already in the library
        if (book !in libraryBooks) {
            // Add the book to the library
            libraryBooks.add(book)
        }
    }

    // Return the updated set of books in the library
    return libraryBooks
}
/**
 * Given a set of existing books in the library and a list of new books,
 * add the new books to the library.
 *
 * @param libraryBooks Set containing the existing books in the library.
 * @param newBooks List containing the new books to be added.
 * @return Updated set of books in the library.
 */
fun addBooksToLibrary(libraryBooks: MutableSet<String>, newBooks: List<String>): MutableSet<String> {
/**
 * Given a set of existing books in the library and a list of new books,
 * add the new books to the library.
 *
 * @param libraryBooks Set containing the existing books in the library.
 * @param newBooks List containing the new books to be added.
 * @return Updated set of books in the library.
 */
fun addBooksToLibrary(libraryBooks: MutableSet<String>, newBooks: List<String>): MutableSet<String> {

    // Convert the list of new books to a set
    val newBooksSet = newBooks.toSet()

    // Iterate over each book in the new books set
    for (book in newBooksSet) {
        // Check if the book is already in the library
        if (book !in libraryBooks) {
            // Add the book to the library
            libraryBooks.add(book)
        }
    }

    // Return the updated set of books in the library
    return libraryBooks
}