/**
 * Given a list of articles, find the common tags among all articles.
 *
 * @param articles List of maps representing articles, where each article has a "title" and "tags" key.
 * @return Set of tags that are present in all articles.
 */
fun findCommonTags(articles: List<Map<String, List<String>>>): Set<String> {

    var commonTags = emptySet<String>()

    for ((index, article) in articles.withIndex()) {
        if (index == 0) {
            commonTags = article["tags"]!!.toSet()
        } else {
            commonTags = commonTags.intersect(article["tags"]!!.toSet())
        }
    }

    return commonTags
}
/**
 * Given a list of articles, find the common tags among all articles.
 *
 * @param articles List of maps representing articles, where each article has a "title" and "tags" key.
 * @return Set of tags that are present in all articles.
 */
fun findCommonTags(articles: List<Map<String, List<String>>>): Set<String> {
/**
 * Given a list of articles, find the common tags among all articles.
 *
 * @param articles List of maps representing articles, where each article has a "title" and "tags" key.
 * @return Set of tags that are present in all articles.
 */
fun findCommonTags(articles: List<Map<String, List<String>>>): Set<String> {

    var commonTags = emptySet<String>()

    for ((index, article) in articles.withIndex()) {
        if (index == 0) {
            commonTags = article["tags"]!!.toSet()
        } else {
            commonTags = commonTags.intersect(article["tags"]!!.toSet())
        }
    }

    return commonTags
}