/**
 * Given two lists of floating-point numbers 'a' and 'b', find the common elements in both lists.
 *
 * @param a The first list of floating-point numbers.
 * @param b The second list of floating-point numbers.
 * @return A list containing the common elements found in both lists.
 *
 * Example:
 * findCommonElements(listOf(1.2, 3.4, 5.6, 7.8, 9.0), listOf(3.4, 5.6, 9.0, 11.2)) -> [3.4, 5.6, 9.0]
 */
fun findCommonElements(a: List<Float>, b: List<Float>): List<Float> {

    val commonElements = mutableListOf<Float>()

    // Iterate over each element in 'a'
    for (element in a) {
        // Check if element is present in 'b'
        if (element in b) {
            // Append the common element to the result list
            commonElements.add(element)
        }
    }

    return commonElements
}
/**
 * Given two lists of floating-point numbers 'a' and 'b', find the common elements in both lists.
 *
 * @param a The first list of floating-point numbers.
 * @param b The second list of floating-point numbers.
 * @return A list containing the common elements found in both lists.
 *
 * Example:
 * findCommonElements(listOf(1.2, 3.4, 5.6, 7.8, 9.0), listOf(3.4, 5.6, 9.0, 11.2)) -> [3.4, 5.6, 9.0]
 */
fun findCommonElements(a: List<Float>, b: List<Float>): List<Float> {
/**
 * Given two lists of floating-point numbers 'a' and 'b', find the common elements in both lists.
 *
 * @param a The first list of floating-point numbers.
 * @param b The second list of floating-point numbers.
 * @return A list containing the common elements found in both lists.
 *
 * Example:
 * findCommonElements(listOf(1.2, 3.4, 5.6, 7.8, 9.0), listOf(3.4, 5.6, 9.0, 11.2)) -> [3.4, 5.6, 9.0]
 */
fun findCommonElements(a: List<Float>, b: List<Float>): List<Float> {

    val commonElements = mutableListOf<Float>()

    // Iterate over each element in 'a'
    for (element in a) {
        // Check if element is present in 'b'
        if (element in b) {
            // Append the common element to the result list
            commonElements.add(element)
        }
    }

    return commonElements
}