/**
 * This function takes a list of DNA fragments and a set of DNA sequences as parameters.
 * It adds each DNA fragment to the set if the fragment is not already present in the set.
 *
 * @param fragments A list of DNA fragments to be added to the set
 * @param setOfSequences A set of DNA sequences
 * @return The updated set after adding the new fragments
 *
 * Example:
 * fragments = listOf("ATCG", "GGTA", "CGCT", "ATCG")
 * sequences = setOf("ATCG", "GGTA")
 * addDnaFragments(fragments, sequences) // Output: setOf("ATCG", "GGTA", "CGCT")
 */
fun addDnaFragments(fragments: List<String>, setOfSequences: MutableSet<String>): MutableSet<String> {

    for (fragment in fragments) {
        if (fragment !in setOfSequences) {
            setOfSequences.add(fragment)
        }
    }
    return setOfSequences
}
/**
 * This function takes a list of DNA fragments and a set of DNA sequences as parameters.
 * It adds each DNA fragment to the set if the fragment is not already present in the set.
 *
 * @param fragments A list of DNA fragments to be added to the set
 * @param setOfSequences A set of DNA sequences
 * @return The updated set after adding the new fragments
 *
 * Example:
 * fragments = listOf("ATCG", "GGTA", "CGCT", "ATCG")
 * sequences = setOf("ATCG", "GGTA")
 * addDnaFragments(fragments, sequences) // Output: setOf("ATCG", "GGTA", "CGCT")
 */
fun addDnaFragments(fragments: List<String>, setOfSequences: MutableSet<String>): MutableSet<String> {
/**
 * This function takes a list of DNA fragments and a set of DNA sequences as parameters.
 * It adds each DNA fragment to the set if the fragment is not already present in the set.
 *
 * @param fragments A list of DNA fragments to be added to the set
 * @param setOfSequences A set of DNA sequences
 * @return The updated set after adding the new fragments
 *
 * Example:
 * fragments = listOf("ATCG", "GGTA", "CGCT", "ATCG")
 * sequences = setOf("ATCG", "GGTA")
 * addDnaFragments(fragments, sequences) // Output: setOf("ATCG", "GGTA", "CGCT")
 */
fun addDnaFragments(fragments: List<String>, setOfSequences: MutableSet<String>): MutableSet<String> {

    for (fragment in fragments) {
        if (fragment !in setOfSequences) {
            setOfSequences.add(fragment)
        }
    }
    return setOfSequences
}