/**
 * Given a dictionary of fonts used by a graphic designer and a set of fonts chosen by a client,
 * this function finds the fonts that are common to both the designer and the client.
 *
 * @param designerFonts A map where keys are the names of the graphic designer's fonts
 *                      and values are the corresponding font sizes.
 * @param clientFonts A set containing the fonts chosen by the client.
 * @return A set containing the fonts that are common to both the graphic designer and the client.
 *
 * Example:
 * designerFonts = mapOf("Arial" to 12, "Helvetica" to 16, "Times New Roman" to 14, "Gotham" to 12)
 * clientFonts = setOf("Arial", "Verdana", "Gotham")
 * findCommonFonts(designerFonts, clientFonts) // Output: setOf("Arial", "Gotham")
 */
fun findCommonFonts(designerFonts: Map<String, Int>, clientFonts: Set<String>): Set<String> {

    val commonFonts = mutableSetOf<String>()

    // Iterate over each font in the designerFonts map
    for (font in designerFonts.keys) {
        if (font in clientFonts) {
            commonFonts.add(font)
        }
    }

    return commonFonts
}
/**
 * Given a dictionary of fonts used by a graphic designer and a set of fonts chosen by a client,
 * this function finds the fonts that are common to both the designer and the client.
 *
 * @param designerFonts A map where keys are the names of the graphic designer's fonts
 *                      and values are the corresponding font sizes.
 * @param clientFonts A set containing the fonts chosen by the client.
 * @return A set containing the fonts that are common to both the graphic designer and the client.
 *
 * Example:
 * designerFonts = mapOf("Arial" to 12, "Helvetica" to 16, "Times New Roman" to 14, "Gotham" to 12)
 * clientFonts = setOf("Arial", "Verdana", "Gotham")
 * findCommonFonts(designerFonts, clientFonts) // Output: setOf("Arial", "Gotham")
 */
fun findCommonFonts(designerFonts: Map<String, Int>, clientFonts: Set<String>): Set<String> {
/**
 * Given a dictionary of fonts used by a graphic designer and a set of fonts chosen by a client,
 * this function finds the fonts that are common to both the designer and the client.
 *
 * @param designerFonts A map where keys are the names of the graphic designer's fonts
 *                      and values are the corresponding font sizes.
 * @param clientFonts A set containing the fonts chosen by the client.
 * @return A set containing the fonts that are common to both the graphic designer and the client.
 *
 * Example:
 * designerFonts = mapOf("Arial" to 12, "Helvetica" to 16, "Times New Roman" to 14, "Gotham" to 12)
 * clientFonts = setOf("Arial", "Verdana", "Gotham")
 * findCommonFonts(designerFonts, clientFonts) // Output: setOf("Arial", "Gotham")
 */
fun findCommonFonts(designerFonts: Map<String, Int>, clientFonts: Set<String>): Set<String> {

    val commonFonts = mutableSetOf<String>()

    // Iterate over each font in the designerFonts map
    for (font in designerFonts.keys) {
        if (font in clientFonts) {
            commonFonts.add(font)
        }
    }

    return commonFonts
}