/**
 * This exercise requires the student to write a function that finds the common genes present in two given lists of genes.
 *
 * The function should take in two lists of genes and should return a new list that contains only the common genes.
 *
 * @param geneList1 List<String> A list containing the genes of the first organism.
 * @param geneList2 List<String> A list containing the genes of the second organism.
 * @return List<String> A list containing only the common genes between geneList1 and geneList2.
 *
 * Example:
 * getCommonGenes(listOf("geneA", "geneB", "geneC", "geneD"), listOf("geneA", "geneD", "geneE"))
 * Returns: listOf("geneA", "geneD")
 */
fun getCommonGenes(geneList1: List<String>, geneList2: List<String>): List<String> {

    val commonGenes = geneList1.intersect(geneList2).toList()
    return commonGenes
}
/**
 * This exercise requires the student to write a function that finds the common genes present in two given lists of genes.
 *
 * The function should take in two lists of genes and should return a new list that contains only the common genes.
 *
 * @param geneList1 List<String> A list containing the genes of the first organism.
 * @param geneList2 List<String> A list containing the genes of the second organism.
 * @return List<String> A list containing only the common genes between geneList1 and geneList2.
 *
 * Example:
 * getCommonGenes(listOf("geneA", "geneB", "geneC", "geneD"), listOf("geneA", "geneD", "geneE"))
 * Returns: listOf("geneA", "geneD")
 */
fun getCommonGenes(geneList1: List<String>, geneList2: List<String>): List<String> {
/**
 * This exercise requires the student to write a function that finds the common genes present in two given lists of genes.
 *
 * The function should take in two lists of genes and should return a new list that contains only the common genes.
 *
 * @param geneList1 List<String> A list containing the genes of the first organism.
 * @param geneList2 List<String> A list containing the genes of the second organism.
 * @return List<String> A list containing only the common genes between geneList1 and geneList2.
 *
 * Example:
 * getCommonGenes(listOf("geneA", "geneB", "geneC", "geneD"), listOf("geneA", "geneD", "geneE"))
 * Returns: listOf("geneA", "geneD")
 */
fun getCommonGenes(geneList1: List<String>, geneList2: List<String>): List<String> {

    val commonGenes = geneList1.intersect(geneList2).toList()
    return commonGenes
}