/**
 * You are a fashion designer and you have a stock of products categorized by type.
 * Your task is to write a function that takes the stock and a category as input and returns a list
 * with the products that belong to that category.
 *
 * @param stock A dictionary where the keys are the category names and the values are lists of products.
 * @param category A string representing the category for which you want to filter the products.
 * @return A list of products belonging to the specified category.
 */
fun filterProducts(stock: Map<String, List<String>>, category: String): List<String> {

    // Check if the category exists in the stock dictionary
    if (category in stock) {
        // Retrieve the products under the given category from the stock
        val products = stock[category]
        // Return the products
        return products.orEmpty()
    } else {
        return emptyList() // Return an empty list if category is not found in the stock dictionary
    }
}
/**
 * You are a fashion designer and you have a stock of products categorized by type.
 * Your task is to write a function that takes the stock and a category as input and returns a list
 * with the products that belong to that category.
 *
 * @param stock A dictionary where the keys are the category names and the values are lists of products.
 * @param category A string representing the category for which you want to filter the products.
 * @return A list of products belonging to the specified category.
 */
fun filterProducts(stock: Map<String, List<String>>, category: String): List<String> {
/**
 * You are a fashion designer and you have a stock of products categorized by type.
 * Your task is to write a function that takes the stock and a category as input and returns a list
 * with the products that belong to that category.
 *
 * @param stock A dictionary where the keys are the category names and the values are lists of products.
 * @param category A string representing the category for which you want to filter the products.
 * @return A list of products belonging to the specified category.
 */
fun filterProducts(stock: Map<String, List<String>>, category: String): List<String> {

    // Check if the category exists in the stock dictionary
    if (category in stock) {
        // Retrieve the products under the given category from the stock
        val products = stock[category]
        // Return the products
        return products.orEmpty()
    } else {
        return emptyList() // Return an empty list if category is not found in the stock dictionary
    }
}