/**
 * Given a list of customer data, filter out customers whose sales are less than minSales
 * and age is greater than maxAge.
 *
 * @param custData List of customer data, where each element is a dictionary containing
 *                 information about a customer.
 * @param minSales Minimum sales threshold.
 * @param maxAge Maximum age for the customers.
 * @return List of customer data after applying the filters.
 */
fun filterCustomers(custData: List<Map<String, Any>>, minSales: Int, maxAge: Int): List<Map<String, Any>> {

    val filteredCustData = mutableListOf<Map<String, Any>>()

    for (customer in custData) {
        val sales = customer.getOrDefault("sales", 0) as Int
        val age = customer.getOrDefault("age", 0) as Int

        if (sales >= minSales && age < maxAge) {
            filteredCustData.add(customer)
        }
    }

    return filteredCustData
}
/**
 * Given a list of customer data, filter out customers whose sales are less than minSales
 * and age is greater than maxAge.
 *
 * @param custData List of customer data, where each element is a dictionary containing
 *                 information about a customer.
 * @param minSales Minimum sales threshold.
 * @param maxAge Maximum age for the customers.
 * @return List of customer data after applying the filters.
 */
fun filterCustomers(custData: List<Map<String, Any>>, minSales: Int, maxAge: Int): List<Map<String, Any>> {
/**
 * Given a list of customer data, filter out customers whose sales are less than minSales
 * and age is greater than maxAge.
 *
 * @param custData List of customer data, where each element is a dictionary containing
 *                 information about a customer.
 * @param minSales Minimum sales threshold.
 * @param maxAge Maximum age for the customers.
 * @return List of customer data after applying the filters.
 */
fun filterCustomers(custData: List<Map<String, Any>>, minSales: Int, maxAge: Int): List<Map<String, Any>> {

    val filteredCustData = mutableListOf<Map<String, Any>>()

    for (customer in custData) {
        val sales = customer.getOrDefault("sales", 0) as Int
        val age = customer.getOrDefault("age", 0) as Int

        if (sales >= minSales && age < maxAge) {
            filteredCustData.add(customer)
        }
    }

    return filteredCustData
}