/**
 * You are a journalist working on a news website. Write a function that takes a list of articles and a list of keywords as input. The function should delete all articles from the list that contain any of the keywords in their title. Return the modified list of articles.
 *
 * @param articles A list of articles, where each article is represented as a dictionary with 'title' as one of its keys.
 * @param keywords A list of keywords.
 * @return A modified list of articles, without the articles that contain any of the keywords in their title.
 */
fun deleteArticles(articles: MutableList<Map<String, String>>, keywords: List<String>): List<Map<String, String>> {

    val iterator = articles.listIterator(articles.size)
    while (iterator.hasPrevious()) {
        val article = iterator.previous()
        for (keyword in keywords) {
            if (keyword in article["title"] ?: "") {
                iterator.remove()
                break
            }
        }
    }
    return articles
}
/**
 * You are a journalist working on a news website. Write a function that takes a list of articles and a list of keywords as input. The function should delete all articles from the list that contain any of the keywords in their title. Return the modified list of articles.
 *
 * @param articles A list of articles, where each article is represented as a dictionary with 'title' as one of its keys.
 * @param keywords A list of keywords.
 * @return A modified list of articles, without the articles that contain any of the keywords in their title.
 */
fun deleteArticles(articles: MutableList<Map<String, String>>, keywords: List<String>): List<Map<String, String>> {
/**
 * You are a journalist working on a news website. Write a function that takes a list of articles and a list of keywords as input. The function should delete all articles from the list that contain any of the keywords in their title. Return the modified list of articles.
 *
 * @param articles A list of articles, where each article is represented as a dictionary with 'title' as one of its keys.
 * @param keywords A list of keywords.
 * @return A modified list of articles, without the articles that contain any of the keywords in their title.
 */
fun deleteArticles(articles: MutableList<Map<String, String>>, keywords: List<String>): List<Map<String, String>> {

    val iterator = articles.listIterator(articles.size)
    while (iterator.hasPrevious()) {
        val article = iterator.previous()
        for (keyword in keywords) {
            if (keyword in article["title"] ?: "") {
                iterator.remove()
                break
            }
        }
    }
    return articles
}