/**
 * Given a gene sequence and a target sequence, determine whether the target sequence is present in the gene sequence.
 * Return true if the target sequence is found, otherwise return false.
 */
fun geneSearch(geneSequence: String, targetSequence: String): Boolean {

    val geneLen = geneSequence.length
    val targetLen = targetSequence.length
    if (geneLen < targetLen) {
        return false
    }

    var i = 0
    while (i <= geneLen - targetLen) {
        var j = 0
        while (j < targetLen) {
            if (geneSequence[i + j] != targetSequence[j]) {
                break
            }
            j++
        }
        if (j == targetLen) {
            return true
        }
        i++
    }

    return false
}

// Example usage:
/**
 * Given a gene sequence and a target sequence, determine whether the target sequence is present in the gene sequence.
 * Return true if the target sequence is found, otherwise return false.
 */
fun geneSearch(geneSequence: String, targetSequence: String): Boolean {
/**
 * Given a gene sequence and a target sequence, determine whether the target sequence is present in the gene sequence.
 * Return true if the target sequence is found, otherwise return false.
 */
fun geneSearch(geneSequence: String, targetSequence: String): Boolean {

    val geneLen = geneSequence.length
    val targetLen = targetSequence.length
    if (geneLen < targetLen) {
        return false
    }

    var i = 0
    while (i <= geneLen - targetLen) {
        var j = 0
        while (j < targetLen) {
            if (geneSequence[i + j] != targetSequence[j]) {
                break
            }
            j++
        }
        if (j == targetLen) {
            return true
        }
        i++
    }

    return false
}

// Example usage: