/**
 * Given a list of guests and a set of guests who have reservations,
 * return a list of guests who have arrived.
 *
 * @param guestList a list of guests (string values)
 * @param hasReservation a set containing guests who have reservations
 * @return a list containing guests who have arrived (not members of the 'hasReservation" set)
 *
 * Example:
 * guestList = listOf("Alice", "Bob", "Charlie", "Dave")
 * hasReservation = setOf("Bob", "Dave")
 * guestArrivals(guestList, hasReservation) -> listOf("Alice", "Charlie")
 */
fun guestArrivals(guestList: List<String>, hasReservation: Set<String>): List<String> {

    val arrivals = mutableListOf<String>()

    for (guest in guestList) {
        if (guest !in hasReservation) {
            arrivals.add(guest)
        }
    }

    return arrivals
}
/**
 * Given a list of guests and a set of guests who have reservations,
 * return a list of guests who have arrived.
 *
 * @param guestList a list of guests (string values)
 * @param hasReservation a set containing guests who have reservations
 * @return a list containing guests who have arrived (not members of the 'hasReservation" set)
 *
 * Example:
 * guestList = listOf("Alice", "Bob", "Charlie", "Dave")
 * hasReservation = setOf("Bob", "Dave")
 * guestArrivals(guestList, hasReservation) -> listOf("Alice", "Charlie")
 */
fun guestArrivals(guestList: List<String>, hasReservation: Set<String>): List<String> {
/**
 * Given a list of guests and a set of guests who have reservations,
 * return a list of guests who have arrived.
 *
 * @param guestList a list of guests (string values)
 * @param hasReservation a set containing guests who have reservations
 * @return a list containing guests who have arrived (not members of the 'hasReservation" set)
 *
 * Example:
 * guestList = listOf("Alice", "Bob", "Charlie", "Dave")
 * hasReservation = setOf("Bob", "Dave")
 * guestArrivals(guestList, hasReservation) -> listOf("Alice", "Charlie")
 */
fun guestArrivals(guestList: List<String>, hasReservation: Set<String>): List<String> {

    val arrivals = mutableListOf<String>()

    for (guest in guestList) {
        if (guest !in hasReservation) {
            arrivals.add(guest)
        }
    }

    return arrivals
}