/**
 * Given a list of items and an integer value, returns a list containing the indices of items in the list
 * that are greater than or equal to the given value, sorted in descending order.
 *
 * @param items A list containing integers
 * @param value An integer value
 * @return A list of indices (integers) indicating the positions of items greater than or equal to the given value
 *
 * Example:
 * findIntersection(listOf(4, 2, 8, 1, 6, 3, 9, 7), 5) -> listOf(6, 4, 2, 7)
 */
fun findIntersection(items: List<Int>, value: Int): List<Int> {

    val indices = mutableListOf<Int>()

    for (i in items.indices) {
        if (items[i] >= value) {
            indices.add(i)
        }
    }

    indices.sortDescending()

    return indices
}
/**
 * Given a list of items and an integer value, returns a list containing the indices of items in the list
 * that are greater than or equal to the given value, sorted in descending order.
 *
 * @param items A list containing integers
 * @param value An integer value
 * @return A list of indices (integers) indicating the positions of items greater than or equal to the given value
 *
 * Example:
 * findIntersection(listOf(4, 2, 8, 1, 6, 3, 9, 7), 5) -> listOf(6, 4, 2, 7)
 */
fun findIntersection(items: List<Int>, value: Int): List<Int> {
/**
 * Given a list of items and an integer value, returns a list containing the indices of items in the list
 * that are greater than or equal to the given value, sorted in descending order.
 *
 * @param items A list containing integers
 * @param value An integer value
 * @return A list of indices (integers) indicating the positions of items greater than or equal to the given value
 *
 * Example:
 * findIntersection(listOf(4, 2, 8, 1, 6, 3, 9, 7), 5) -> listOf(6, 4, 2, 7)
 */
fun findIntersection(items: List<Int>, value: Int): List<Int> {

    val indices = mutableListOf<Int>()

    for (i in items.indices) {
        if (items[i] >= value) {
            indices.add(i)
        }
    }

    indices.sortDescending()

    return indices
}