/**
 * Given two strings, find the common elements in both strings and return them as a tuple.
 * A common element is an integer that is present in both strings.
 *
 * Example:
 * Input:
 * string1 = "1, 2, 3, 4, 5, 6"
 * string2 = "4, 5, 6, 7, 8, 9"
 * Output:
 * (4, 5, 6)
 */
fun findCommonElements(string1: String, string2: String): Set<Int> {

    // Convert the strings to sets of integers
    val set1 = string1.split(", ").map { it.toInt() }.toSet()
    val set2 = string2.split(", ").map { it.toInt() }.toSet()

    // Find the common elements in both sets
    val commonElements = set1.intersect(set2)

    return commonElements
}
/**
 * Given two strings, find the common elements in both strings and return them as a tuple.
 * A common element is an integer that is present in both strings.
 *
 * Example:
 * Input:
 * string1 = "1, 2, 3, 4, 5, 6"
 * string2 = "4, 5, 6, 7, 8, 9"
 * Output:
 * (4, 5, 6)
 */
fun findCommonElements(string1: String, string2: String): Set<Int> {
/**
 * Given two strings, find the common elements in both strings and return them as a tuple.
 * A common element is an integer that is present in both strings.
 *
 * Example:
 * Input:
 * string1 = "1, 2, 3, 4, 5, 6"
 * string2 = "4, 5, 6, 7, 8, 9"
 * Output:
 * (4, 5, 6)
 */
fun findCommonElements(string1: String, string2: String): Set<Int> {

    // Convert the strings to sets of integers
    val set1 = string1.split(", ").map { it.toInt() }.toSet()
    val set2 = string2.split(", ").map { it.toInt() }.toSet()

    // Find the common elements in both sets
    val commonElements = set1.intersect(set2)

    return commonElements
}