/**
 * Given a list of sales data, returns a new list containing only the tuples where the
 * sales value is greater than the given threshold.
 *
 * @param salesData A list of pairs representing sales data with the format (product, sales)
 * @param threshold An integer representing the minimum sales value to consider
 * @return A list of pairs that meet the condition of having sales greater than the threshold
 *
 * Example:
 * filterSalesGreaterThan(listOf("Product A" to 200, "Product B" to 150, "Product C" to 300), 250)
 * => listOf("Product C" to 300)
 *
 * Note:
 * - You can assume that the salesData list is always non-empty
 * - The returned list should be in the same order as the original list
 */
fun filterSalesGreaterThan(salesData: List<Pair<String, Int>>, threshold: Int): List<Pair<String, Int>> {

    return salesData.filter { it.second > threshold }
}

val salesData = listOf("Product A" to 200, "Product B" to 150, "Product C" to 300, "Product D" to 50, "Product E" to 400)

// Find all sales tuples with sales greater than 200
val filteredSales = filterSalesGreaterThan(salesData, 200)
/**
 * Given a list of sales data, returns a new list containing only the tuples where the
 * sales value is greater than the given threshold.
 *
 * @param salesData A list of pairs representing sales data with the format (product, sales)
 * @param threshold An integer representing the minimum sales value to consider
 * @return A list of pairs that meet the condition of having sales greater than the threshold
 *
 * Example:
 * filterSalesGreaterThan(listOf("Product A" to 200, "Product B" to 150, "Product C" to 300), 250)
 * => listOf("Product C" to 300)
 *
 * Note:
 * - You can assume that the salesData list is always non-empty
 * - The returned list should be in the same order as the original list
 */
fun filterSalesGreaterThan(salesData: List<Pair<String, Int>>, threshold: Int): List<Pair<String, Int>> {
/**
 * Given a list of sales data, returns a new list containing only the tuples where the
 * sales value is greater than the given threshold.
 *
 * @param salesData A list of pairs representing sales data with the format (product, sales)
 * @param threshold An integer representing the minimum sales value to consider
 * @return A list of pairs that meet the condition of having sales greater than the threshold
 *
 * Example:
 * filterSalesGreaterThan(listOf("Product A" to 200, "Product B" to 150, "Product C" to 300), 250)
 * => listOf("Product C" to 300)
 *
 * Note:
 * - You can assume that the salesData list is always non-empty
 * - The returned list should be in the same order as the original list
 */
fun filterSalesGreaterThan(salesData: List<Pair<String, Int>>, threshold: Int): List<Pair<String, Int>> {

    return salesData.filter { it.second > threshold }
}

val salesData = listOf("Product A" to 200, "Product B" to 150, "Product C" to 300, "Product D" to 50, "Product E" to 400)

// Find all sales tuples with sales greater than 200
val filteredSales = filterSalesGreaterThan(salesData, 200)