/**
 * Given a dictionary representing a collection of fashion items, remove all items that are out of stock.
 *
 * @param dictionary A dictionary representing the fashion items, where the keys are item names and the
 * values are the corresponding stock availability.
 * @return The updated dictionary after removing all out of stock items.
 */
fun removeItems(dictionary: MutableMap<String, Int>): MutableMap<String, Int> {

    // Create a list to store item names that are out of stock
    val outOfStockItems = mutableListOf<String>()
    
    // Iterate over the dictionary
    for ((item, stock) in dictionary) {
        // Check if the stock is zero or less
        if (stock <= 0) {
            // Add the item name to the outOfStockItems list
            outOfStockItems.add(item)
        }
    }
    
    // Remove all out of stock items from the dictionary
    for (item in outOfStockItems) {
        dictionary.remove(item)
    }
    
    return dictionary
}
/**
 * Given a dictionary representing a collection of fashion items, remove all items that are out of stock.
 *
 * @param dictionary A dictionary representing the fashion items, where the keys are item names and the
 * values are the corresponding stock availability.
 * @return The updated dictionary after removing all out of stock items.
 */
fun removeItems(dictionary: MutableMap<String, Int>): MutableMap<String, Int> {
/**
 * Given a dictionary representing a collection of fashion items, remove all items that are out of stock.
 *
 * @param dictionary A dictionary representing the fashion items, where the keys are item names and the
 * values are the corresponding stock availability.
 * @return The updated dictionary after removing all out of stock items.
 */
fun removeItems(dictionary: MutableMap<String, Int>): MutableMap<String, Int> {

    // Create a list to store item names that are out of stock
    val outOfStockItems = mutableListOf<String>()
    
    // Iterate over the dictionary
    for ((item, stock) in dictionary) {
        // Check if the stock is zero or less
        if (stock <= 0) {
            // Add the item name to the outOfStockItems list
            outOfStockItems.add(item)
        }
    }
    
    // Remove all out of stock items from the dictionary
    for (item in outOfStockItems) {
        dictionary.remove(item)
    }
    
    return dictionary
}