/**
 * Find the common elements between two lists.
 *
 * @param list1 First list of floating-point numbers.
 * @param list2 Second list of floating-point numbers.
 * @return A list containing the common elements between list1 and list2.
 */
fun findCommonElements(list1: List<Double>, list2: List<Double>): List<Double> {

    val commonElements = mutableListOf<Double>()

    // Loop over each element in list1
    for (element in list1) {
        // Use the contains() function to check if the element is present in list2
        if (list2.contains(element)) {
            // Append the element to the commonElements list
            commonElements.add(element)
        }
    }

    return commonElements
}
/**
 * Find the common elements between two lists.
 *
 * @param list1 First list of floating-point numbers.
 * @param list2 Second list of floating-point numbers.
 * @return A list containing the common elements between list1 and list2.
 */
fun findCommonElements(list1: List<Double>, list2: List<Double>): List<Double> {
/**
 * Find the common elements between two lists.
 *
 * @param list1 First list of floating-point numbers.
 * @param list2 Second list of floating-point numbers.
 * @return A list containing the common elements between list1 and list2.
 */
fun findCommonElements(list1: List<Double>, list2: List<Double>): List<Double> {

    val commonElements = mutableListOf<Double>()

    // Loop over each element in list1
    for (element in list1) {
        // Use the contains() function to check if the element is present in list2
        if (list2.contains(element)) {
            // Append the element to the commonElements list
            commonElements.add(element)
        }
    }

    return commonElements
}