/**
 * Given two lists representing the names of nurses and patients in a hospital, the function should
 * return the set of nurses who are assigned to the patients.
 *
 * @param nurses A list containing the names of nurses
 * @param patients A list containing the names of patients
 * @return A set containing the names of nurses who are assigned to the patients
 *
 * Example:
 * intersectionOfSets(listOf("Alice", "Bob", "Eve"), listOf("Dan", "Eve", "Frank")) // Output: setOf("Eve")
 */
fun intersectionOfSets(nurses: List<String>, patients: List<String>): Set<String> {

    // Use set intersection to find the common elements between nurses and patients
    val assignedNurses = nurses.intersect(patients).toSet()
    return assignedNurses
}
/**
 * Given two lists representing the names of nurses and patients in a hospital, the function should
 * return the set of nurses who are assigned to the patients.
 *
 * @param nurses A list containing the names of nurses
 * @param patients A list containing the names of patients
 * @return A set containing the names of nurses who are assigned to the patients
 *
 * Example:
 * intersectionOfSets(listOf("Alice", "Bob", "Eve"), listOf("Dan", "Eve", "Frank")) // Output: setOf("Eve")
 */
fun intersectionOfSets(nurses: List<String>, patients: List<String>): Set<String> {
/**
 * Given two lists representing the names of nurses and patients in a hospital, the function should
 * return the set of nurses who are assigned to the patients.
 *
 * @param nurses A list containing the names of nurses
 * @param patients A list containing the names of patients
 * @return A set containing the names of nurses who are assigned to the patients
 *
 * Example:
 * intersectionOfSets(listOf("Alice", "Bob", "Eve"), listOf("Dan", "Eve", "Frank")) // Output: setOf("Eve")
 */
fun intersectionOfSets(nurses: List<String>, patients: List<String>): Set<String> {

    // Use set intersection to find the common elements between nurses and patients
    val assignedNurses = nurses.intersect(patients).toSet()
    return assignedNurses
}