/**
 * This function takes a list of clients and a list of programs and counts the number of clients assigned to each program.
 *
 * @param clients a list of client names (String)
 * @param programs a list of program names (String)
 * @return A map with each program as a key and the number of clients assigned to that program as the value.
 */
fun countClientsAssignedToPrograms(clients: List<String>, programs: List<String>): Map<String, Int> {

    // Create an empty map to store program-client assignments
    val programCount = mutableMapOf<String, Int>()

    // Iterate over each program in the programs list
    for (program in programs) {
        // Initialize a counter for clients assigned to the program
        var clientCount = 0

        // Iterate over each client in the clients list
        for (client in clients) {
            // Check if the client is assigned to the current program
            if (client == program) {
                // Increment the client count for the program
                clientCount++
            }
        }

        // Store the client count for the program in the programCount map
        programCount[program] = clientCount
    }

    return programCount
}
/**
 * This function takes a list of clients and a list of programs and counts the number of clients assigned to each program.
 *
 * @param clients a list of client names (String)
 * @param programs a list of program names (String)
 * @return A map with each program as a key and the number of clients assigned to that program as the value.
 */
fun countClientsAssignedToPrograms(clients: List<String>, programs: List<String>): Map<String, Int> {
/**
 * This function takes a list of clients and a list of programs and counts the number of clients assigned to each program.
 *
 * @param clients a list of client names (String)
 * @param programs a list of program names (String)
 * @return A map with each program as a key and the number of clients assigned to that program as the value.
 */
fun countClientsAssignedToPrograms(clients: List<String>, programs: List<String>): Map<String, Int> {

    // Create an empty map to store program-client assignments
    val programCount = mutableMapOf<String, Int>()

    // Iterate over each program in the programs list
    for (program in programs) {
        // Initialize a counter for clients assigned to the program
        var clientCount = 0

        // Iterate over each client in the clients list
        for (client in clients) {
            // Check if the client is assigned to the current program
            if (client == program) {
                // Increment the client count for the program
                clientCount++
            }
        }

        // Store the client count for the program in the programCount map
        programCount[program] = clientCount
    }

    return programCount
}