/**
 * Given a list of engineers and a list of names to check, return a list of names that are common in both lists.
 */
fun commonNames(engineersList: List<String>, namesToCheck: List<String>): List<String> {

    val commonNames = mutableListOf<String>()

    // Loop through every engineer in the engineers list
    for (engineer in engineersList) {
        // Loop through every name to check
        for (name in namesToCheck) {
            // Check if the name is already in the commonNames list or not
            if (name.equals(engineer, ignoreCase = true) && name !in commonNames) {
                commonNames.add(name)
            }
        }
    }

    return commonNames
}
/**
 * Given a list of engineers and a list of names to check, return a list of names that are common in both lists.
 */
fun commonNames(engineersList: List<String>, namesToCheck: List<String>): List<String> {
/**
 * Given a list of engineers and a list of names to check, return a list of names that are common in both lists.
 */
fun commonNames(engineersList: List<String>, namesToCheck: List<String>): List<String> {

    val commonNames = mutableListOf<String>()

    // Loop through every engineer in the engineers list
    for (engineer in engineersList) {
        // Loop through every name to check
        for (name in namesToCheck) {
            // Check if the name is already in the commonNames list or not
            if (name.equals(engineer, ignoreCase = true) && name !in commonNames) {
                commonNames.add(name)
            }
        }
    }

    return commonNames
}