/**
 * Given a nucleotide sequence, modify the sequence between the start index and end index (both inclusive)
 * by replacing it with the given replacement sequence.
 *
 * @param sequence The nucleotide sequence to be modified.
 * @param startIndex The starting index from where the modification should begin (inclusive).
 * @param endIndex The ending index where the modification should end (inclusive).
 * @param replacement The sequence to replace with.
 * @return The modified nucleotide sequence.
 *
 * Example:
 * modifySequence("ATGCGTA", 2, 5, "CCC") // Returns "ATCCCCA"
 */
fun modifySequence(sequence: String, startIndex: Int, endIndex: Int, replacement: String): String {

    val modifiedSequence = sequence.substring(0, startIndex) + replacement + sequence.substring(endIndex + 1)
    return modifiedSequence
}
/**
 * Given a nucleotide sequence, modify the sequence between the start index and end index (both inclusive)
 * by replacing it with the given replacement sequence.
 *
 * @param sequence The nucleotide sequence to be modified.
 * @param startIndex The starting index from where the modification should begin (inclusive).
 * @param endIndex The ending index where the modification should end (inclusive).
 * @param replacement The sequence to replace with.
 * @return The modified nucleotide sequence.
 *
 * Example:
 * modifySequence("ATGCGTA", 2, 5, "CCC") // Returns "ATCCCCA"
 */
fun modifySequence(sequence: String, startIndex: Int, endIndex: Int, replacement: String): String {
/**
 * Given a nucleotide sequence, modify the sequence between the start index and end index (both inclusive)
 * by replacing it with the given replacement sequence.
 *
 * @param sequence The nucleotide sequence to be modified.
 * @param startIndex The starting index from where the modification should begin (inclusive).
 * @param endIndex The ending index where the modification should end (inclusive).
 * @param replacement The sequence to replace with.
 * @return The modified nucleotide sequence.
 *
 * Example:
 * modifySequence("ATGCGTA", 2, 5, "CCC") // Returns "ATCCCCA"
 */
fun modifySequence(sequence: String, startIndex: Int, endIndex: Int, replacement: String): String {

    val modifiedSequence = sequence.substring(0, startIndex) + replacement + sequence.substring(endIndex + 1)
    return modifiedSequence
}