/**
 * A social worker wants to count the number of visits to different communities during the week.
 * Implement a function that takes a list of week days and visit frequencies and returns the total number of visits for each day.
 */
fun countVisits(weekDays: List<String>, visitFrequency: List<Int>): Map<String, Int> {

    // Create an empty map to store the total visits for each day
    val totalVisits = mutableMapOf<String, Int>()

    // Iterate over the input week days
    for (i in weekDays.indices) {
        val day = weekDays[i]
        
        // Check if the day is already in the map
        if (totalVisits.containsKey(day)) {
            // If it is, increment the total visits for that day with the visit frequency
            totalVisits[day] = totalVisits.getValue(day) + visitFrequency[i]
        } else {
            // If it is not, add the day to the map and initialize the total visits
            totalVisits[day] = visitFrequency[i]
        }
    }

    return totalVisits
}
/**
 * A social worker wants to count the number of visits to different communities during the week.
 * Implement a function that takes a list of week days and visit frequencies and returns the total number of visits for each day.
 */
fun countVisits(weekDays: List<String>, visitFrequency: List<Int>): Map<String, Int> {
/**
 * A social worker wants to count the number of visits to different communities during the week.
 * Implement a function that takes a list of week days and visit frequencies and returns the total number of visits for each day.
 */
fun countVisits(weekDays: List<String>, visitFrequency: List<Int>): Map<String, Int> {

    // Create an empty map to store the total visits for each day
    val totalVisits = mutableMapOf<String, Int>()

    // Iterate over the input week days
    for (i in weekDays.indices) {
        val day = weekDays[i]
        
        // Check if the day is already in the map
        if (totalVisits.containsKey(day)) {
            // If it is, increment the total visits for that day with the visit frequency
            totalVisits[day] = totalVisits.getValue(day) + visitFrequency[i]
        } else {
            // If it is not, add the day to the map and initialize the total visits
            totalVisits[day] = visitFrequency[i]
        }
    }

    return totalVisits
}