/**
 * Remove books from the library list based on given index values.
 *
 * @param libraryList list of books in the library
 * @param booksToRemove list of index values to remove books from library
 * @return updated library list after removing books
 */
fun removeBooks(libraryList: MutableList<String>, booksToRemove: List<Int>): MutableList<String> {

    // Remove books from the library list
    for (index in booksToRemove.sortedDescending()) {
        try {
            libraryList.removeAt(index)
        } catch (e: IndexOutOfBoundsException) {
            // Handle exception
        }
    }

    return libraryList
}
/**
 * Remove books from the library list based on given index values.
 *
 * @param libraryList list of books in the library
 * @param booksToRemove list of index values to remove books from library
 * @return updated library list after removing books
 */
fun removeBooks(libraryList: MutableList<String>, booksToRemove: List<Int>): MutableList<String> {
/**
 * Remove books from the library list based on given index values.
 *
 * @param libraryList list of books in the library
 * @param booksToRemove list of index values to remove books from library
 * @return updated library list after removing books
 */
fun removeBooks(libraryList: MutableList<String>, booksToRemove: List<Int>): MutableList<String> {

    // Remove books from the library list
    for (index in booksToRemove.sortedDescending()) {
        try {
            libraryList.removeAt(index)
        } catch (e: IndexOutOfBoundsException) {
            // Handle exception
        }
    }

    return libraryList
}