/**
 * Update the list of dancers by removing duplicates and adding new dancers.
 *
 * @param dancers List of existing dancers.
 * @param newDancers List of new dancers.
 * @return Updated list of dancers with duplicates removed and new dancers added.
 *
 * Example:
 * dancers = ['Alice', 'Bob', 'Charlie']
 * newDancers = ['Bob', 'Dave', 'Eve']
 * dancerUpdate(dancers, newDancers) -> ['Alice', 'Charlie', 'Dave', 'Eve']
 */
fun dancerUpdate(dancers: List<String>, newDancers: List<String>): List<String> {

    // Remove duplicates from dancers list
    val uniqueDancers = dancers.toSet().toList()

    // Remove duplicates from newDancers list
    val uniqueNewDancers = newDancers.toSet().toList()

    // Add newDancers to dancers list
    val updatedDancers = uniqueDancers.toMutableList()
    updatedDancers.addAll(uniqueNewDancers)

    return updatedDancers
}
/**
 * Update the list of dancers by removing duplicates and adding new dancers.
 *
 * @param dancers List of existing dancers.
 * @param newDancers List of new dancers.
 * @return Updated list of dancers with duplicates removed and new dancers added.
 *
 * Example:
 * dancers = ['Alice', 'Bob', 'Charlie']
 * newDancers = ['Bob', 'Dave', 'Eve']
 * dancerUpdate(dancers, newDancers) -> ['Alice', 'Charlie', 'Dave', 'Eve']
 */
fun dancerUpdate(dancers: List<String>, newDancers: List<String>): List<String> {
/**
 * Update the list of dancers by removing duplicates and adding new dancers.
 *
 * @param dancers List of existing dancers.
 * @param newDancers List of new dancers.
 * @return Updated list of dancers with duplicates removed and new dancers added.
 *
 * Example:
 * dancers = ['Alice', 'Bob', 'Charlie']
 * newDancers = ['Bob', 'Dave', 'Eve']
 * dancerUpdate(dancers, newDancers) -> ['Alice', 'Charlie', 'Dave', 'Eve']
 */
fun dancerUpdate(dancers: List<String>, newDancers: List<String>): List<String> {

    // Remove duplicates from dancers list
    val uniqueDancers = dancers.toSet().toList()

    // Remove duplicates from newDancers list
    val uniqueNewDancers = newDancers.toSet().toList()

    // Add newDancers to dancers list
    val updatedDancers = uniqueDancers.toMutableList()
    updatedDancers.addAll(uniqueNewDancers)

    return updatedDancers
}