/**
 * Given a list 'lst', the function should count the number of elements within the range 'start' and 'end'
 * and return the count.
 *
 * @param lst A list of integers
 * @param start The start element of the range (inclusive)
 * @param end The end element of the range (exclusive)
 * @return The count of elements within the range
 *
 * Example:
 * countElementsInRange(listOf(1, 2, 3, 4, 5), 2, 5)
 * Output: 3
 */
fun countElementsInRange(lst: List<Int>, start: Int, end: Int): Int {

    var count = 0

    // Iterate over each element in the list
    for (num in lst) {
        // Check if the element is within the range
        if (num in start until end) {
            count++
        }
    }

    return count
}
/**
 * Given a list 'lst', the function should count the number of elements within the range 'start' and 'end'
 * and return the count.
 *
 * @param lst A list of integers
 * @param start The start element of the range (inclusive)
 * @param end The end element of the range (exclusive)
 * @return The count of elements within the range
 *
 * Example:
 * countElementsInRange(listOf(1, 2, 3, 4, 5), 2, 5)
 * Output: 3
 */
fun countElementsInRange(lst: List<Int>, start: Int, end: Int): Int {
/**
 * Given a list 'lst', the function should count the number of elements within the range 'start' and 'end'
 * and return the count.
 *
 * @param lst A list of integers
 * @param start The start element of the range (inclusive)
 * @param end The end element of the range (exclusive)
 * @return The count of elements within the range
 *
 * Example:
 * countElementsInRange(listOf(1, 2, 3, 4, 5), 2, 5)
 * Output: 3
 */
fun countElementsInRange(lst: List<Int>, start: Int, end: Int): Int {

    var count = 0

    // Iterate over each element in the list
    for (num in lst) {
        // Check if the element is within the range
        if (num in start until end) {
            count++
        }
    }

    return count
}