/**
 * Calculate the number of elements common to both lists.
 *
 * @param lst1 The first list.
 * @param lst2 The second list.
 * @return The count of common elements between lst1 and lst2.
 * @throws IllegalArgumentException If any of the input lists is empty.
 */
fun intersectionCount(lst1: List<Int>, lst2: List<Int>): Int {

    if (lst1.isEmpty() || lst2.isEmpty()) {
        throw IllegalArgumentException("Input lists cannot be empty")
    }

    var count = 0

    for (element in lst1) {
        if (element in lst2) {
            count++
        }
    }

    return count
}
/**
 * Calculate the number of elements common to both lists.
 *
 * @param lst1 The first list.
 * @param lst2 The second list.
 * @return The count of common elements between lst1 and lst2.
 * @throws IllegalArgumentException If any of the input lists is empty.
 */
fun intersectionCount(lst1: List<Int>, lst2: List<Int>): Int {
/**
 * Calculate the number of elements common to both lists.
 *
 * @param lst1 The first list.
 * @param lst2 The second list.
 * @return The count of common elements between lst1 and lst2.
 * @throws IllegalArgumentException If any of the input lists is empty.
 */
fun intersectionCount(lst1: List<Int>, lst2: List<Int>): Int {

    if (lst1.isEmpty() || lst2.isEmpty()) {
        throw IllegalArgumentException("Input lists cannot be empty")
    }

    var count = 0

    for (element in lst1) {
        if (element in lst2) {
            count++
        }
    }

    return count
}