/**
 * Takes in a set of observations made by an astronomer and a list of new observations to update the existing set.
 *
 * @param observations The current set of observations made by the astronomer.
 * @param newObservations The list of new observations to update the set.
 * @return The updated set of observations.
 *
 * Example:
 * observations = setOf("star1", "star2", "star3")
 * newObservations = listOf("star2", "galaxy1", "star4")
 * updateObservations(observations, newObservations) // Output: setOf("star1", "star2", "star3", "galaxy1", "star4")
 */
fun updateObservations(observations: Set<String>, newObservations: List<String>): Set<String> {

    // Convert the list of new observations to a set
    val newObservationsSet = newObservations.toSet()

    // Update the existing set of observations by taking the union of both sets
    val updatedObservations = observations.union(newObservationsSet)

    return updatedObservations
}
/**
 * Takes in a set of observations made by an astronomer and a list of new observations to update the existing set.
 *
 * @param observations The current set of observations made by the astronomer.
 * @param newObservations The list of new observations to update the set.
 * @return The updated set of observations.
 *
 * Example:
 * observations = setOf("star1", "star2", "star3")
 * newObservations = listOf("star2", "galaxy1", "star4")
 * updateObservations(observations, newObservations) // Output: setOf("star1", "star2", "star3", "galaxy1", "star4")
 */
fun updateObservations(observations: Set<String>, newObservations: List<String>): Set<String> {
/**
 * Takes in a set of observations made by an astronomer and a list of new observations to update the existing set.
 *
 * @param observations The current set of observations made by the astronomer.
 * @param newObservations The list of new observations to update the set.
 * @return The updated set of observations.
 *
 * Example:
 * observations = setOf("star1", "star2", "star3")
 * newObservations = listOf("star2", "galaxy1", "star4")
 * updateObservations(observations, newObservations) // Output: setOf("star1", "star2", "star3", "galaxy1", "star4")
 */
fun updateObservations(observations: Set<String>, newObservations: List<String>): Set<String> {

    // Convert the list of new observations to a set
    val newObservationsSet = newObservations.toSet()

    // Update the existing set of observations by taking the union of both sets
    val updatedObservations = observations.union(newObservationsSet)

    return updatedObservations
}