/**
 * This function counts the number of unique customers based on their transaction data.
 *
 * @param customerData A list of dictionaries where each dictionary contains the transaction data of a customer.
 *                     The dictionary contains 'customer_id' and 'transaction_date' as keys and their respective values.
 * @return The count of unique customers as an integer value.
 */
fun countUniqueCustomers(customerData: List<Map<String, String>>): Int {

    // Create an empty set to store unique customer IDs
    val uniqueCustomers = mutableSetOf<String>()

    // Iterate through each customer's transaction data
    for (customer in customerData) {
        // Extract the customer ID from the dictionary
        val customerId = customer["customer_id"]

        // Add the customer ID to the set of unique customers
        customerId?.let { uniqueCustomers.add(it) }
    }

    // Return the count of unique customers
    return uniqueCustomers.size
}
/**
 * This function counts the number of unique customers based on their transaction data.
 *
 * @param customerData A list of dictionaries where each dictionary contains the transaction data of a customer.
 *                     The dictionary contains 'customer_id' and 'transaction_date' as keys and their respective values.
 * @return The count of unique customers as an integer value.
 */
fun countUniqueCustomers(customerData: List<Map<String, String>>): Int {
/**
 * This function counts the number of unique customers based on their transaction data.
 *
 * @param customerData A list of dictionaries where each dictionary contains the transaction data of a customer.
 *                     The dictionary contains 'customer_id' and 'transaction_date' as keys and their respective values.
 * @return The count of unique customers as an integer value.
 */
fun countUniqueCustomers(customerData: List<Map<String, String>>): Int {

    // Create an empty set to store unique customer IDs
    val uniqueCustomers = mutableSetOf<String>()

    // Iterate through each customer's transaction data
    for (customer in customerData) {
        // Extract the customer ID from the dictionary
        val customerId = customer["customer_id"]

        // Add the customer ID to the set of unique customers
        customerId?.let { uniqueCustomers.add(it) }
    }

    // Return the count of unique customers
    return uniqueCustomers.size
}