/**
 * This function takes two integers as input and returns a list of common digits present in both numbers.
 *
 * @param num1 First input integer.
 * @param num2 Second input integer.
 * @return List of common digits found in num1 and num2.
 */
fun findCommonDigits(num1: Int, num2: Int): List<Char> {

    val commonDigits = mutableListOf<Char>()

    // Convert the integers to strings
    val strNum1 = num1.toString()
    val strNum2 = num2.toString()

    // Check for common digits using the 'in' operator
    for (digit in strNum1) {
        if (digit.isDigit() && digit in strNum2 && digit !in commonDigits) {
            commonDigits.add(digit)
        }
    }

    return commonDigits
}
/**
 * This function takes two integers as input and returns a list of common digits present in both numbers.
 *
 * @param num1 First input integer.
 * @param num2 Second input integer.
 * @return List of common digits found in num1 and num2.
 */
fun findCommonDigits(num1: Int, num2: Int): List<Char> {
/**
 * This function takes two integers as input and returns a list of common digits present in both numbers.
 *
 * @param num1 First input integer.
 * @param num2 Second input integer.
 * @return List of common digits found in num1 and num2.
 */
fun findCommonDigits(num1: Int, num2: Int): List<Char> {

    val commonDigits = mutableListOf<Char>()

    // Convert the integers to strings
    val strNum1 = num1.toString()
    val strNum2 = num2.toString()

    // Check for common digits using the 'in' operator
    for (digit in strNum1) {
        if (digit.isDigit() && digit in strNum2 && digit !in commonDigits) {
            commonDigits.add(digit)
        }
    }

    return commonDigits
}