/**
 * A carpenter is organizing their tools in two sets: lumber and nails.
 * They need to remove the duplicate items that exist in both sets.
 * Complete the function to remove the duplicated items from both sets and return the updated sets.
 *
 * @param lumber A set of lumber items.
 * @param nails A set of nail items.
 * @return A pair containing the updated sets without duplicate items.
 *
 * Examples:
 * removeDuplicates(setOf("wood", "saw", "hammer"), setOf("nail", "wood"))
 * Output: Pair(setOf("saw", "hammer"), setOf("nail"))
 *
 * removeDuplicates(setOf("wood", "saw", "hammer", "screwdriver", "measuring tape"), setOf("screwdriver", "nail", "wood"))
 * Output: Pair(setOf("saw", "hammer", "measuring tape"), setOf("nail"))
 */
fun removeDuplicates(lumber: Set<String>, nails: Set<String>): Pair<Set<String>, Set<String>> {

    // Find duplicates between the sets and remove them
    val duplicates = lumber.intersect(nails)
    val updatedLumber = lumber - duplicates
    val updatedNails = nails - duplicates

    return Pair(updatedLumber, updatedNails)
}
/**
 * A carpenter is organizing their tools in two sets: lumber and nails.
 * They need to remove the duplicate items that exist in both sets.
 * Complete the function to remove the duplicated items from both sets and return the updated sets.
 *
 * @param lumber A set of lumber items.
 * @param nails A set of nail items.
 * @return A pair containing the updated sets without duplicate items.
 *
 * Examples:
 * removeDuplicates(setOf("wood", "saw", "hammer"), setOf("nail", "wood"))
 * Output: Pair(setOf("saw", "hammer"), setOf("nail"))
 *
 * removeDuplicates(setOf("wood", "saw", "hammer", "screwdriver", "measuring tape"), setOf("screwdriver", "nail", "wood"))
 * Output: Pair(setOf("saw", "hammer", "measuring tape"), setOf("nail"))
 */
fun removeDuplicates(lumber: Set<String>, nails: Set<String>): Pair<Set<String>, Set<String>> {
/**
 * A carpenter is organizing their tools in two sets: lumber and nails.
 * They need to remove the duplicate items that exist in both sets.
 * Complete the function to remove the duplicated items from both sets and return the updated sets.
 *
 * @param lumber A set of lumber items.
 * @param nails A set of nail items.
 * @return A pair containing the updated sets without duplicate items.
 *
 * Examples:
 * removeDuplicates(setOf("wood", "saw", "hammer"), setOf("nail", "wood"))
 * Output: Pair(setOf("saw", "hammer"), setOf("nail"))
 *
 * removeDuplicates(setOf("wood", "saw", "hammer", "screwdriver", "measuring tape"), setOf("screwdriver", "nail", "wood"))
 * Output: Pair(setOf("saw", "hammer", "measuring tape"), setOf("nail"))
 */
fun removeDuplicates(lumber: Set<String>, nails: Set<String>): Pair<Set<String>, Set<String>> {

    // Find duplicates between the sets and remove them
    val duplicates = lumber.intersect(nails)
    val updatedLumber = lumber - duplicates
    val updatedNails = nails - duplicates

    return Pair(updatedLumber, updatedNails)
}