/**
 * This exercise requires the police officer to create a function that takes two arguments: an originalList and a threshold.
 * The function should iterate through the originalList and copy only the elements that are greater than the threshold into a new list.
 * The function should then return the new list containing the copied elements.
 *
 * @param originalList The original list containing elements of different values.
 * @param threshold The threshold to compare the elements of the original list.
 * @return A new list containing only the elements that are greater than the threshold.
 */
fun copyGreaterLists(originalList: List<Int>, threshold: Int): List<Int> {

    // Initialize an empty list to store the copied elements
    val copiedList = mutableListOf<Int>()

    // Iterate through the originalList
    for (element in originalList) {
        if (element > threshold) {
            // Append the element to the copiedList if it's greater than the threshold
            copiedList.add(element)
        }
    }

    return copiedList
}
/**
 * This exercise requires the police officer to create a function that takes two arguments: an originalList and a threshold.
 * The function should iterate through the originalList and copy only the elements that are greater than the threshold into a new list.
 * The function should then return the new list containing the copied elements.
 *
 * @param originalList The original list containing elements of different values.
 * @param threshold The threshold to compare the elements of the original list.
 * @return A new list containing only the elements that are greater than the threshold.
 */
fun copyGreaterLists(originalList: List<Int>, threshold: Int): List<Int> {
/**
 * This exercise requires the police officer to create a function that takes two arguments: an originalList and a threshold.
 * The function should iterate through the originalList and copy only the elements that are greater than the threshold into a new list.
 * The function should then return the new list containing the copied elements.
 *
 * @param originalList The original list containing elements of different values.
 * @param threshold The threshold to compare the elements of the original list.
 * @return A new list containing only the elements that are greater than the threshold.
 */
fun copyGreaterLists(originalList: List<Int>, threshold: Int): List<Int> {

    // Initialize an empty list to store the copied elements
    val copiedList = mutableListOf<Int>()

    // Iterate through the originalList
    for (element in originalList) {
        if (element > threshold) {
            // Append the element to the copiedList if it's greater than the threshold
            copiedList.add(element)
        }
    }

    return copiedList
}