/**
 * Given a list of elements and a selection (a list of indices of selected elements),
 * find the indices of the non-selected elements.
 *
 * @param elements A list of elements.
 * @param selection A list of indices of selected elements.
 * @return A list of indices of non-selected elements.
 */
fun findNonSelectedElements(elements: List<Any>, selection: List<Int>): List<Int> {

    val nonSelectedIndices = mutableListOf<Int>()

    // Loop through all the elements
    for (i in elements.indices) {
        if (i !in selection) {  // Check if the current index is not in the selection
            nonSelectedIndices.add(i)  // If not, add it to the list of non-selected indices
        }
    }

    return nonSelectedIndices
}
/**
 * Given a list of elements and a selection (a list of indices of selected elements),
 * find the indices of the non-selected elements.
 *
 * @param elements A list of elements.
 * @param selection A list of indices of selected elements.
 * @return A list of indices of non-selected elements.
 */
fun findNonSelectedElements(elements: List<Any>, selection: List<Int>): List<Int> {
/**
 * Given a list of elements and a selection (a list of indices of selected elements),
 * find the indices of the non-selected elements.
 *
 * @param elements A list of elements.
 * @param selection A list of indices of selected elements.
 * @return A list of indices of non-selected elements.
 */
fun findNonSelectedElements(elements: List<Any>, selection: List<Int>): List<Int> {

    val nonSelectedIndices = mutableListOf<Int>()

    // Loop through all the elements
    for (i in elements.indices) {
        if (i !in selection) {  // Check if the current index is not in the selection
            nonSelectedIndices.add(i)  // If not, add it to the list of non-selected indices
        }
    }

    return nonSelectedIndices
}