/**
 * Given a list of transactions and a threshold value, return a list of strings indicating whether each transaction 
 * is above, below, or equal to the threshold value.
 *
 * Examples:
 * checkTransactions(listOf(50.5, 100.25, 75.0, 80.5, 60.75), 70.0) -> ['above', 'above', 'above', 'above', 'above']
 * checkTransactions(listOf(21.0, 15.5, 18.75, 22.25, 19.0), 20.0) -> ['below', 'below', 'below', 'above', 'below']
 * checkTransactions(listOf(10.0, 9.5, 12.75, 15.25, 18.0), 12.5) -> ['below', 'below', 'above', 'above', 'above']
 */
fun checkTransactions(transactions: List<Double>, threshold: Double): List<String> {

    return transactions.map { transaction ->
        when {
            transaction > threshold -> "above"
            transaction < threshold -> "below"
            else -> "equal"
        }
    }
}
/**
 * Given a list of transactions and a threshold value, return a list of strings indicating whether each transaction 
 * is above, below, or equal to the threshold value.
 *
 * Examples:
 * checkTransactions(listOf(50.5, 100.25, 75.0, 80.5, 60.75), 70.0) -> ['above', 'above', 'above', 'above', 'above']
 * checkTransactions(listOf(21.0, 15.5, 18.75, 22.25, 19.0), 20.0) -> ['below', 'below', 'below', 'above', 'below']
 * checkTransactions(listOf(10.0, 9.5, 12.75, 15.25, 18.0), 12.5) -> ['below', 'below', 'above', 'above', 'above']
 */
fun checkTransactions(transactions: List<Double>, threshold: Double): List<String> {
/**
 * Given a list of transactions and a threshold value, return a list of strings indicating whether each transaction 
 * is above, below, or equal to the threshold value.
 *
 * Examples:
 * checkTransactions(listOf(50.5, 100.25, 75.0, 80.5, 60.75), 70.0) -> ['above', 'above', 'above', 'above', 'above']
 * checkTransactions(listOf(21.0, 15.5, 18.75, 22.25, 19.0), 20.0) -> ['below', 'below', 'below', 'above', 'below']
 * checkTransactions(listOf(10.0, 9.5, 12.75, 15.25, 18.0), 12.5) -> ['below', 'below', 'above', 'above', 'above']
 */
fun checkTransactions(transactions: List<Double>, threshold: Double): List<String> {

    return transactions.map { transaction ->
        when {
            transaction > threshold -> "above"
            transaction < threshold -> "below"
            else -> "equal"
        }
    }
}