/**
 * This exercise is about finding the common colors present in two sets of colors.
 * Given two lists of colors, you need to write a function that returns a list
 * containing the common colors between the two given lists.
 *
 * @param colors1 A list of colors (strings)
 * @param colors2 Another list of colors (strings)
 * @return A list containing the common colors between colors1 and colors2
 */
fun findCommonColors(colors1: List<String>, colors2: List<String>): List<String> {

    // Initialize an empty list to store the common colors
    val commonColors = mutableListOf<String>()

    // Iterate through each color in the first list
    for (color in colors1) {
        // Check if the color is present in the second list
        if (color in colors2) {
            // Add the color to the common colors list
            commonColors.add(color)
        }
    }

    return commonColors
}
/**
 * This exercise is about finding the common colors present in two sets of colors.
 * Given two lists of colors, you need to write a function that returns a list
 * containing the common colors between the two given lists.
 *
 * @param colors1 A list of colors (strings)
 * @param colors2 Another list of colors (strings)
 * @return A list containing the common colors between colors1 and colors2
 */
fun findCommonColors(colors1: List<String>, colors2: List<String>): List<String> {
/**
 * This exercise is about finding the common colors present in two sets of colors.
 * Given two lists of colors, you need to write a function that returns a list
 * containing the common colors between the two given lists.
 *
 * @param colors1 A list of colors (strings)
 * @param colors2 Another list of colors (strings)
 * @return A list containing the common colors between colors1 and colors2
 */
fun findCommonColors(colors1: List<String>, colors2: List<String>): List<String> {

    // Initialize an empty list to store the common colors
    val commonColors = mutableListOf<String>()

    // Iterate through each color in the first list
    for (color in colors1) {
        // Check if the color is present in the second list
        if (color in colors2) {
            // Add the color to the common colors list
            commonColors.add(color)
        }
    }

    return commonColors
}