/**
 * Given a list of circuits, this function removes the faulty circuits 
 * from the list and returns the updated list.
 * Each circuit can be represented as a Pair in the format (circuitNumber, isFaulty).
 * The circuitNumber is an integer and isFaulty is a boolean value (true or false).
 * 
 * Modify the given circuitList using a nested ternary operator and a loop to remove any circuit 
 * that is faulty (isFaulty = true). Return the updated circuitList.
 * 
 * Example:
 * removeFaultyCircuits(listOf(Pair(1, false), Pair(2, true), Pair(3, false), Pair(4, true)))
 * Output: [(1, false), (3, false)]
 */
fun removeFaultyCircuits(circuitList: List<Pair<Int, Boolean>>): List<Pair<Int, Boolean>> {

    return circuitList.filter { it.second == false }
}
/**
 * Given a list of circuits, this function removes the faulty circuits 
 * from the list and returns the updated list.
 * Each circuit can be represented as a Pair in the format (circuitNumber, isFaulty).
 * The circuitNumber is an integer and isFaulty is a boolean value (true or false).
 * 
 * Modify the given circuitList using a nested ternary operator and a loop to remove any circuit 
 * that is faulty (isFaulty = true). Return the updated circuitList.
 * 
 * Example:
 * removeFaultyCircuits(listOf(Pair(1, false), Pair(2, true), Pair(3, false), Pair(4, true)))
 * Output: [(1, false), (3, false)]
 */
fun removeFaultyCircuits(circuitList: List<Pair<Int, Boolean>>): List<Pair<Int, Boolean>> {
/**
 * Given a list of circuits, this function removes the faulty circuits 
 * from the list and returns the updated list.
 * Each circuit can be represented as a Pair in the format (circuitNumber, isFaulty).
 * The circuitNumber is an integer and isFaulty is a boolean value (true or false).
 * 
 * Modify the given circuitList using a nested ternary operator and a loop to remove any circuit 
 * that is faulty (isFaulty = true). Return the updated circuitList.
 * 
 * Example:
 * removeFaultyCircuits(listOf(Pair(1, false), Pair(2, true), Pair(3, false), Pair(4, true)))
 * Output: [(1, false), (3, false)]
 */
fun removeFaultyCircuits(circuitList: List<Pair<Int, Boolean>>): List<Pair<Int, Boolean>> {

    return circuitList.filter { it.second == false }
}