/**
 * This function finds the common factors between two numbers using a brute force approach
 */
fun findCommonFactors(num1: Int, num2: Int): List<Int> {

    val factors = mutableListOf<Int>()

    for (i in 1..minOf(num1, num2)) {
        if (num1 % i == 0 && num2 % i == 0) {
            factors.add(i)
        }
    }

    return factors
}
/**
 * This function finds the common factors between two numbers using a brute force approach
 */
fun findCommonFactors(num1: Int, num2: Int): List<Int> {
/**
 * This function finds the common factors between two numbers using a brute force approach
 */
fun findCommonFactors(num1: Int, num2: Int): List<Int> {

    val factors = mutableListOf<Int>()

    for (i in 1..minOf(num1, num2)) {
        if (num1 % i == 0 && num2 % i == 0) {
            factors.add(i)
        }
    }

    return factors
}