/**
 * Given a DNA sequence represented as a string, change the base at the specified index and return the modified sequence.
 *
 * @param seq The original DNA sequence.
 * @param index The index at which to change the base.
 * @param base The new base to replace the existing one.
 * @return The modified DNA sequence.
 *
 * Example:
 * Given the DNA sequence 'ATCGGTA', index 4, and base 'C', the modified sequence would be 'ATCGCTA'.
 */
fun changeDnaSequence(seq: String, index: Int, base: Char): String {

    // Convert the string sequence to a list of characters
    val seqList = seq.toMutableList()

    // Change the base at the specified index
    seqList[index] = base

    // Convert the modified list back to a string and return
    return seqList.joinToString("")
}
/**
 * Given a DNA sequence represented as a string, change the base at the specified index and return the modified sequence.
 *
 * @param seq The original DNA sequence.
 * @param index The index at which to change the base.
 * @param base The new base to replace the existing one.
 * @return The modified DNA sequence.
 *
 * Example:
 * Given the DNA sequence 'ATCGGTA', index 4, and base 'C', the modified sequence would be 'ATCGCTA'.
 */
fun changeDnaSequence(seq: String, index: Int, base: Char): String {
/**
 * Given a DNA sequence represented as a string, change the base at the specified index and return the modified sequence.
 *
 * @param seq The original DNA sequence.
 * @param index The index at which to change the base.
 * @param base The new base to replace the existing one.
 * @return The modified DNA sequence.
 *
 * Example:
 * Given the DNA sequence 'ATCGGTA', index 4, and base 'C', the modified sequence would be 'ATCGCTA'.
 */
fun changeDnaSequence(seq: String, index: Int, base: Char): String {

    // Convert the string sequence to a list of characters
    val seqList = seq.toMutableList()

    // Change the base at the specified index
    seqList[index] = base

    // Convert the modified list back to a string and return
    return seqList.joinToString("")
}