/**
 * Given a dictionary of item stocks where the keys are item names and the values are the number of items in stock,
 * write a function that returns the number of items in stock for a specific item.
 *
 * @param item The name of the item to check the stock for.
 * @param stocks A dictionary where keys are item names and values are the number of items in stock.
 * @return The number of items in stock for the given item.
 *
 * Example:
 * val stocks = mapOf(
 *      "shirt" to 10,
 *      "pants" to 5,
 *      "dress" to 7,
 *      "jacket" to 0
 * )
 * getInStock("shirt", stocks) // 10
 * getInStock("pants", stocks) // 5
 * getInStock("jacket", stocks) // 0
 */
fun getInStock(item: String, stocks: Map<String, Int>): Int {

    // Use dictionary indexing to retrieve the number of items in stock for the given item
    return stocks[item] ?: -1
}
/**
 * Given a dictionary of item stocks where the keys are item names and the values are the number of items in stock,
 * write a function that returns the number of items in stock for a specific item.
 *
 * @param item The name of the item to check the stock for.
 * @param stocks A dictionary where keys are item names and values are the number of items in stock.
 * @return The number of items in stock for the given item.
 *
 * Example:
 * val stocks = mapOf(
 *      "shirt" to 10,
 *      "pants" to 5,
 *      "dress" to 7,
 *      "jacket" to 0
 * )
 * getInStock("shirt", stocks) // 10
 * getInStock("pants", stocks) // 5
 * getInStock("jacket", stocks) // 0
 */
fun getInStock(item: String, stocks: Map<String, Int>): Int {
/**
 * Given a dictionary of item stocks where the keys are item names and the values are the number of items in stock,
 * write a function that returns the number of items in stock for a specific item.
 *
 * @param item The name of the item to check the stock for.
 * @param stocks A dictionary where keys are item names and values are the number of items in stock.
 * @return The number of items in stock for the given item.
 *
 * Example:
 * val stocks = mapOf(
 *      "shirt" to 10,
 *      "pants" to 5,
 *      "dress" to 7,
 *      "jacket" to 0
 * )
 * getInStock("shirt", stocks) // 10
 * getInStock("pants", stocks) // 5
 * getInStock("jacket", stocks) // 0
 */
fun getInStock(item: String, stocks: Map<String, Int>): Int {

    // Use dictionary indexing to retrieve the number of items in stock for the given item
    return stocks[item] ?: -1
}