/**
 * This function checks if engineers meet the eligibility criteria based on experience years and education level.
 *
 * @param eligibleEngineers list of engineers
 * @param experienceYears list of experience years for each engineer
 * @param educationLevel list of education levels for each engineer
 * @return a list of engineers who meet the eligibility criteria (experience years >= 5 and education level = "PhD")
 */
fun checkEngineers(eligibleEngineers: List<String>, experienceYears: List<Int>, educationLevel: List<String>): List<String> {

    val eligibleEngineersList = mutableListOf<String>()

    for (i in eligibleEngineers.indices) {
        if (experienceYears[i] >= 5 && educationLevel[i] == "PhD") {
            eligibleEngineersList.add(eligibleEngineers[i])
        }
    }

    return eligibleEngineersList
}

// Example usage
val engineers = listOf("John", "Maria", "David", "Lisa")
val yearsOfExperience = listOf(2, 6, 8, 4)
/**
 * This function checks if engineers meet the eligibility criteria based on experience years and education level.
 *
 * @param eligibleEngineers list of engineers
 * @param experienceYears list of experience years for each engineer
 * @param educationLevel list of education levels for each engineer
 * @return a list of engineers who meet the eligibility criteria (experience years >= 5 and education level = "PhD")
 */
fun checkEngineers(eligibleEngineers: List<String>, experienceYears: List<Int>, educationLevel: List<String>): List<String> {
/**
 * This function checks if engineers meet the eligibility criteria based on experience years and education level.
 *
 * @param eligibleEngineers list of engineers
 * @param experienceYears list of experience years for each engineer
 * @param educationLevel list of education levels for each engineer
 * @return a list of engineers who meet the eligibility criteria (experience years >= 5 and education level = "PhD")
 */
fun checkEngineers(eligibleEngineers: List<String>, experienceYears: List<Int>, educationLevel: List<String>): List<String> {

    val eligibleEngineersList = mutableListOf<String>()

    for (i in eligibleEngineers.indices) {
        if (experienceYears[i] >= 5 && educationLevel[i] == "PhD") {
            eligibleEngineersList.add(eligibleEngineers[i])
        }
    }

    return eligibleEngineersList
}

// Example usage
val engineers = listOf("John", "Maria", "David", "Lisa")
val yearsOfExperience = listOf(2, 6, 8, 4)