/**
 * This function takes a list of books and a string as input and returns a list of books that contain the given string.
 *
 * @param books A list of book titles
 * @param string The string you are searching for in the book titles
 * @return A list of book titles that contain the given string
 *
 * Example:
 * findBooksWithString(listOf("Introduction to Complex Analysis", "Algorithms and Data Structures", "The Art of War"), "Complex")
 * Output: ["Introduction to Complex Analysis"]
 */
fun findBooksWithString(books: List<String>, string: String): List<String> {

    val result = mutableListOf<String>()
    for (book in books) {
        if (string in book) {
            result.add(book)
        }
    }
    return result
}
/**
 * This function takes a list of books and a string as input and returns a list of books that contain the given string.
 *
 * @param books A list of book titles
 * @param string The string you are searching for in the book titles
 * @return A list of book titles that contain the given string
 *
 * Example:
 * findBooksWithString(listOf("Introduction to Complex Analysis", "Algorithms and Data Structures", "The Art of War"), "Complex")
 * Output: ["Introduction to Complex Analysis"]
 */
fun findBooksWithString(books: List<String>, string: String): List<String> {
/**
 * This function takes a list of books and a string as input and returns a list of books that contain the given string.
 *
 * @param books A list of book titles
 * @param string The string you are searching for in the book titles
 * @return A list of book titles that contain the given string
 *
 * Example:
 * findBooksWithString(listOf("Introduction to Complex Analysis", "Algorithms and Data Structures", "The Art of War"), "Complex")
 * Output: ["Introduction to Complex Analysis"]
 */
fun findBooksWithString(books: List<String>, string: String): List<String> {

    val result = mutableListOf<String>()
    for (book in books) {
        if (string in book) {
            result.add(book)
        }
    }
    return result
}