/**
 * Given two lists of gene names, find the common genes between them.
 * Use nested loops with break and continue statements to optimize the search.
 *
 * @param sample1 List containing the gene names of sample 1
 * @param sample2 List containing the gene names of sample 2
 * @return List containing the gene names common between sample 1 and sample 2
 */
fun findCommonGenes(sample1: List<String>, sample2: List<String>): List<String> {

    val commonGenes = mutableListOf<String>()
    for (gene1 in sample1) {
        for (gene2 in sample2) {
            if (gene1 == gene2) {
                commonGenes.add(gene1)
                break
            }
        }
    }
    return commonGenes
}
/**
 * Given two lists of gene names, find the common genes between them.
 * Use nested loops with break and continue statements to optimize the search.
 *
 * @param sample1 List containing the gene names of sample 1
 * @param sample2 List containing the gene names of sample 2
 * @return List containing the gene names common between sample 1 and sample 2
 */
fun findCommonGenes(sample1: List<String>, sample2: List<String>): List<String> {
/**
 * Given two lists of gene names, find the common genes between them.
 * Use nested loops with break and continue statements to optimize the search.
 *
 * @param sample1 List containing the gene names of sample 1
 * @param sample2 List containing the gene names of sample 2
 * @return List containing the gene names common between sample 1 and sample 2
 */
fun findCommonGenes(sample1: List<String>, sample2: List<String>): List<String> {

    val commonGenes = mutableListOf<String>()
    for (gene1 in sample1) {
        for (gene2 in sample2) {
            if (gene1 == gene2) {
                commonGenes.add(gene1)
                break
            }
        }
    }
    return commonGenes
}