/**
 * This function finds the common counters between the two maps given carpenterCounters and carpenterFurniture
 */
fun dictIntersection(carpenterCounters: Map<String, Int>, carpenterFurniture: Map<String, Int>): Map<String, Int> {

    val commonCounters = mutableMapOf<String, Int>()

    for ((counter, count) in carpenterCounters) {
        if (counter in carpenterFurniture && count > 0 && carpenterFurniture[counter]!! > 0) {
            if (count < carpenterFurniture[counter]!!) {
                commonCounters[counter] = count
            } else {
                commonCounters[counter] = carpenterFurniture[counter]!!
            }
        }
    }

    return commonCounters
}
/**
 * This function finds the common counters between the two maps given carpenterCounters and carpenterFurniture
 */
fun dictIntersection(carpenterCounters: Map<String, Int>, carpenterFurniture: Map<String, Int>): Map<String, Int> {
/**
 * This function finds the common counters between the two maps given carpenterCounters and carpenterFurniture
 */
fun dictIntersection(carpenterCounters: Map<String, Int>, carpenterFurniture: Map<String, Int>): Map<String, Int> {

    val commonCounters = mutableMapOf<String, Int>()

    for ((counter, count) in carpenterCounters) {
        if (counter in carpenterFurniture && count > 0 && carpenterFurniture[counter]!! > 0) {
            if (count < carpenterFurniture[counter]!!) {
                commonCounters[counter] = count
            } else {
                commonCounters[counter] = carpenterFurniture[counter]!!
            }
        }
    }

    return commonCounters
}