/**
 * This function counts the number of elements within a nested list that are greater than the given threshold.
 *
 * @param data A list of lists containing floating-point numbers.
 * @param threshold A float representing the threshold value.
 * @return An integer representing the count of elements greater than the threshold.
 *
 * Example:
 * countElementsWithinThreshold(listOf(listOf(1.2, 0.5, 2.7), listOf(0.8, 3.2, 1.0)), 1.5) -> 4
 */
fun countElementsWithinThreshold(data: List<List<Float>>, threshold: Float): Int {

    var count = 0
    for (row in data) {
        for (element in row) {
            if (element > threshold) {
                count++
            }
        }
    }
    return count
}
/**
 * This function counts the number of elements within a nested list that are greater than the given threshold.
 *
 * @param data A list of lists containing floating-point numbers.
 * @param threshold A float representing the threshold value.
 * @return An integer representing the count of elements greater than the threshold.
 *
 * Example:
 * countElementsWithinThreshold(listOf(listOf(1.2, 0.5, 2.7), listOf(0.8, 3.2, 1.0)), 1.5) -> 4
 */
fun countElementsWithinThreshold(data: List<List<Float>>, threshold: Float): Int {
/**
 * This function counts the number of elements within a nested list that are greater than the given threshold.
 *
 * @param data A list of lists containing floating-point numbers.
 * @param threshold A float representing the threshold value.
 * @return An integer representing the count of elements greater than the threshold.
 *
 * Example:
 * countElementsWithinThreshold(listOf(listOf(1.2, 0.5, 2.7), listOf(0.8, 3.2, 1.0)), 1.5) -> 4
 */
fun countElementsWithinThreshold(data: List<List<Float>>, threshold: Float): Int {

    var count = 0
    for (row in data) {
        for (element in row) {
            if (element > threshold) {
                count++
            }
        }
    }
    return count
}