/**
 * Given a list of photos and a dictionary of metadata, remove any duplicate photos from the list.
 * Return the updated list with unique photos.
 *
 * @param photos A list of photo names
 * @param metadata A dictionary containing photo names as keys and their corresponding metadata as values
 * @return Updated list of unique photo names
 */
fun removeDuplicates(photos: List<String>, metadata: Map<String, String>): List<String> {

    val uniquePhotos = mutableListOf<String>()  // Create a mutable list to store unique photos

    // Iterate over each photo in the list
    for (photo in photos) {
        var duplicate = false  // Flag to check if photo is a duplicate

        // Iterate over the unique photos list to check for duplicates
        for (uniquePhoto in uniquePhotos) {

            // Compare the metadata of the current photo with the metadata of unique photos
            if (metadata[uniquePhoto] == metadata[photo]) {
                duplicate = true  // Set duplicate flag to true
                break  // Break the loop as duplicate photo is found
            }
        }

        // If the photo is not a duplicate, add it to the unique photos list
        if (!duplicate) {
            uniquePhotos.add(photo)
        }
    }

    return uniquePhotos
}
/**
 * Given a list of photos and a dictionary of metadata, remove any duplicate photos from the list.
 * Return the updated list with unique photos.
 *
 * @param photos A list of photo names
 * @param metadata A dictionary containing photo names as keys and their corresponding metadata as values
 * @return Updated list of unique photo names
 */
fun removeDuplicates(photos: List<String>, metadata: Map<String, String>): List<String> {
/**
 * Given a list of photos and a dictionary of metadata, remove any duplicate photos from the list.
 * Return the updated list with unique photos.
 *
 * @param photos A list of photo names
 * @param metadata A dictionary containing photo names as keys and their corresponding metadata as values
 * @return Updated list of unique photo names
 */
fun removeDuplicates(photos: List<String>, metadata: Map<String, String>): List<String> {

    val uniquePhotos = mutableListOf<String>()  // Create a mutable list to store unique photos

    // Iterate over each photo in the list
    for (photo in photos) {
        var duplicate = false  // Flag to check if photo is a duplicate

        // Iterate over the unique photos list to check for duplicates
        for (uniquePhoto in uniquePhotos) {

            // Compare the metadata of the current photo with the metadata of unique photos
            if (metadata[uniquePhoto] == metadata[photo]) {
                duplicate = true  // Set duplicate flag to true
                break  // Break the loop as duplicate photo is found
            }
        }

        // If the photo is not a duplicate, add it to the unique photos list
        if (!duplicate) {
            uniquePhotos.add(photo)
        }
    }

    return uniquePhotos
}