/**
 * Given a list of products, a set of categories to exclude, and a set of keywords to include,
 * filter out the products that meet the given conditions and return the filtered list.
 *
 * @param products A list of maps representing the products, each containing 'name', 'category', and 'keyword' fields.
 * @param categoriesToExclude A set of categories to exclude from the filtered products.
 * @param keywordsToInclude A set of keywords to include in the filtered products.
 * @return filteredProducts A list of maps representing the filtered products.
 */
fun filterProducts(products: List<Map<String, String>>, categoriesToExclude: Set<String>, keywordsToInclude: Set<String>): List<Map<String, String>> {

    val filteredProducts = mutableListOf<Map<String, String>>()
    for (product in products) {
        val category = product["category"]
        val keyword = product["keyword"]

        if (category in categoriesToExclude) {
            continue
        }

        if (keyword !in keywordsToInclude) {
            continue
        }

        filteredProducts.add(product)
    }

    return filteredProducts
}
/**
 * Given a list of products, a set of categories to exclude, and a set of keywords to include,
 * filter out the products that meet the given conditions and return the filtered list.
 *
 * @param products A list of maps representing the products, each containing 'name', 'category', and 'keyword' fields.
 * @param categoriesToExclude A set of categories to exclude from the filtered products.
 * @param keywordsToInclude A set of keywords to include in the filtered products.
 * @return filteredProducts A list of maps representing the filtered products.
 */
fun filterProducts(products: List<Map<String, String>>, categoriesToExclude: Set<String>, keywordsToInclude: Set<String>): List<Map<String, String>> {
/**
 * Given a list of products, a set of categories to exclude, and a set of keywords to include,
 * filter out the products that meet the given conditions and return the filtered list.
 *
 * @param products A list of maps representing the products, each containing 'name', 'category', and 'keyword' fields.
 * @param categoriesToExclude A set of categories to exclude from the filtered products.
 * @param keywordsToInclude A set of keywords to include in the filtered products.
 * @return filteredProducts A list of maps representing the filtered products.
 */
fun filterProducts(products: List<Map<String, String>>, categoriesToExclude: Set<String>, keywordsToInclude: Set<String>): List<Map<String, String>> {

    val filteredProducts = mutableListOf<Map<String, String>>()
    for (product in products) {
        val category = product["category"]
        val keyword = product["keyword"]

        if (category in categoriesToExclude) {
            continue
        }

        if (keyword !in keywordsToInclude) {
            continue
        }

        filteredProducts.add(product)
    }

    return filteredProducts
}