/**
 * Given two lists of photos where each photo is represented as a string, write a function to find the common elements
 * (photos) between the two lists. The function should return a new list containing the common elements.
 *
 * @param photos1 A list of photos (strings)
 * @param photos2 Another list of photos (strings)
 * @return A list containing the common elements (photos) between the two lists
 *
 * Example:
 * findCommonElements(listOf("photo1", "photo2", "photo3"), listOf("photo4", "photo3", "photo2"))
 * Output: ["photo2", "photo3"]
 */
fun findCommonElements(photos1: List<String>, photos2: List<String>): List<String> {

    val commonPhotos = mutableListOf<String>()

    for (photo in photos1) {
        if (photo in photos2) {
            commonPhotos.add(photo)
        }
    }

    return commonPhotos
}
/**
 * Given two lists of photos where each photo is represented as a string, write a function to find the common elements
 * (photos) between the two lists. The function should return a new list containing the common elements.
 *
 * @param photos1 A list of photos (strings)
 * @param photos2 Another list of photos (strings)
 * @return A list containing the common elements (photos) between the two lists
 *
 * Example:
 * findCommonElements(listOf("photo1", "photo2", "photo3"), listOf("photo4", "photo3", "photo2"))
 * Output: ["photo2", "photo3"]
 */
fun findCommonElements(photos1: List<String>, photos2: List<String>): List<String> {
/**
 * Given two lists of photos where each photo is represented as a string, write a function to find the common elements
 * (photos) between the two lists. The function should return a new list containing the common elements.
 *
 * @param photos1 A list of photos (strings)
 * @param photos2 Another list of photos (strings)
 * @return A list containing the common elements (photos) between the two lists
 *
 * Example:
 * findCommonElements(listOf("photo1", "photo2", "photo3"), listOf("photo4", "photo3", "photo2"))
 * Output: ["photo2", "photo3"]
 */
fun findCommonElements(photos1: List<String>, photos2: List<String>): List<String> {

    val commonPhotos = mutableListOf<String>()

    for (photo in photos1) {
        if (photo in photos2) {
            commonPhotos.add(photo)
        }
    }

    return commonPhotos
}