/**
 * Given a dictionary of photographers and the number of photos they have,
 * update the dictionary by incrementing the number of photos for the specified photographer.
 *
 * @param photographer A dictionary representing different photographers and their number of photos.
 *                     The keys are the photographer names (string) and the values are the number of photos (int).
 * @param numPhotos A dictionary representing the number of photos to increment for each photographer.
 *                  The keys are the photographer names (string) and the values are the number of photos to add (int).
 * @return The updated dictionary with incremented photo counts for the specified photographers.
 *
 * Example:
 * photographer = mapOf("John" to 10, "Amy" to 5, "Joe" to 8)
 * numPhotos = mapOf("Amy" to 2, "Joe" to 4)
 * updatePhotos(photographer, numPhotos) => mapOf("John" to 10, "Amy" to 7, "Joe" to 12)
 */
fun updatePhotos(photographer: MutableMap<String, Int>, numPhotos: Map<String, Int>): Map<String, Int> {

    for ((name, count) in numPhotos) {
        if (photographer.containsKey(name)) {
            photographer[name] = photographer.getValue(name) + count
        }
    }
    return photographer
}
/**
 * Given a dictionary of photographers and the number of photos they have,
 * update the dictionary by incrementing the number of photos for the specified photographer.
 *
 * @param photographer A dictionary representing different photographers and their number of photos.
 *                     The keys are the photographer names (string) and the values are the number of photos (int).
 * @param numPhotos A dictionary representing the number of photos to increment for each photographer.
 *                  The keys are the photographer names (string) and the values are the number of photos to add (int).
 * @return The updated dictionary with incremented photo counts for the specified photographers.
 *
 * Example:
 * photographer = mapOf("John" to 10, "Amy" to 5, "Joe" to 8)
 * numPhotos = mapOf("Amy" to 2, "Joe" to 4)
 * updatePhotos(photographer, numPhotos) => mapOf("John" to 10, "Amy" to 7, "Joe" to 12)
 */
fun updatePhotos(photographer: MutableMap<String, Int>, numPhotos: Map<String, Int>): Map<String, Int> {
/**
 * Given a dictionary of photographers and the number of photos they have,
 * update the dictionary by incrementing the number of photos for the specified photographer.
 *
 * @param photographer A dictionary representing different photographers and their number of photos.
 *                     The keys are the photographer names (string) and the values are the number of photos (int).
 * @param numPhotos A dictionary representing the number of photos to increment for each photographer.
 *                  The keys are the photographer names (string) and the values are the number of photos to add (int).
 * @return The updated dictionary with incremented photo counts for the specified photographers.
 *
 * Example:
 * photographer = mapOf("John" to 10, "Amy" to 5, "Joe" to 8)
 * numPhotos = mapOf("Amy" to 2, "Joe" to 4)
 * updatePhotos(photographer, numPhotos) => mapOf("John" to 10, "Amy" to 7, "Joe" to 12)
 */
fun updatePhotos(photographer: MutableMap<String, Int>, numPhotos: Map<String, Int>): Map<String, Int> {

    for ((name, count) in numPhotos) {
        if (photographer.containsKey(name)) {
            photographer[name] = photographer.getValue(name) + count
        }
    }
    return photographer
}