/**
 * The exercise is to find the circuit elements in the given selection.
 *
 * @param elements a list of all elements in the circuit
 * @param selection a list of elements to find in the circuit
 * @return a list of circuit elements found in the selection
 */
fun findCircuitElements(elements: List<String>, selection: List<String>): List<String> {

    // Find the intersection of 'elements' and 'selection' using set operations
    val intersection = elements.intersect(selection).toList()
    return intersection
}

// Example usage
/**
 * The exercise is to find the circuit elements in the given selection.
 *
 * @param elements a list of all elements in the circuit
 * @param selection a list of elements to find in the circuit
 * @return a list of circuit elements found in the selection
 */
fun findCircuitElements(elements: List<String>, selection: List<String>): List<String> {
/**
 * The exercise is to find the circuit elements in the given selection.
 *
 * @param elements a list of all elements in the circuit
 * @param selection a list of elements to find in the circuit
 * @return a list of circuit elements found in the selection
 */
fun findCircuitElements(elements: List<String>, selection: List<String>): List<String> {

    // Find the intersection of 'elements' and 'selection' using set operations
    val intersection = elements.intersect(selection).toList()
    return intersection
}

// Example usage