/**
 * The function finds the faulty wires in a circuit diagram provided as a map.
 * The map consists of wire names as keys and their corresponding status as values.
 * A wire is considered faulty if its status is 'short' or 'open'.
 *
 * @param circuitDiagram A map containing wire names and their statuses.
 * @return A list containing the names of the faulty wires found in the circuit diagram.
 */
fun findFaultyWires(circuitDiagram: Map<String, String>): List<String> {

    val faultyWires = mutableListOf<String>()

    // Looping through the map
    for ((wire, status) in circuitDiagram) {
        if (status == "short" || status == "open") {
            faultyWires.add(wire)
        }
    }

    return faultyWires
}
/**
 * The function finds the faulty wires in a circuit diagram provided as a map.
 * The map consists of wire names as keys and their corresponding status as values.
 * A wire is considered faulty if its status is 'short' or 'open'.
 *
 * @param circuitDiagram A map containing wire names and their statuses.
 * @return A list containing the names of the faulty wires found in the circuit diagram.
 */
fun findFaultyWires(circuitDiagram: Map<String, String>): List<String> {
/**
 * The function finds the faulty wires in a circuit diagram provided as a map.
 * The map consists of wire names as keys and their corresponding status as values.
 * A wire is considered faulty if its status is 'short' or 'open'.
 *
 * @param circuitDiagram A map containing wire names and their statuses.
 * @return A list containing the names of the faulty wires found in the circuit diagram.
 */
fun findFaultyWires(circuitDiagram: Map<String, String>): List<String> {

    val faultyWires = mutableListOf<String>()

    // Looping through the map
    for ((wire, status) in circuitDiagram) {
        if (status == "short" || status == "open") {
            faultyWires.add(wire)
        }
    }

    return faultyWires
}