/**
 * Given two sets, return the number of common elements present in both sets.
 *
 * @param set1 the first set
 * @param set2 the second set
 * @return The count of common elements between the two sets.
 */
fun countCommonElements(set1: Set<*>, set2: Set<*>): Int {

    // Intersection of two sets will give us the common elements
    val commonElements = set1.intersect(set2)

    // Return the count of common elements
    return commonElements.size
}
/**
 * Given two sets, return the number of common elements present in both sets.
 *
 * @param set1 the first set
 * @param set2 the second set
 * @return The count of common elements between the two sets.
 */
fun countCommonElements(set1: Set<*>, set2: Set<*>): Int {
/**
 * Given two sets, return the number of common elements present in both sets.
 *
 * @param set1 the first set
 * @param set2 the second set
 * @return The count of common elements between the two sets.
 */
fun countCommonElements(set1: Set<*>, set2: Set<*>): Int {

    // Intersection of two sets will give us the common elements
    val commonElements = set1.intersect(set2)

    // Return the count of common elements
    return commonElements.size
}