/**
 * Given a list of photos and a list of indexes to delete, remove the photos at the specified indexes.
 *
 * @param photos The list containing the original photos.
 * @param deleteList The list containing the indexes to be deleted.
 * @return The updated list of photos after deleting the specified indexes.
 *
 * Example:
 * deletePhotos(listOf("pic1", "pic2", "pic3", "pic4"), listOf(0, 2))
 * Output: ['pic2', 'pic4']
 */
fun deletePhotos(photos: MutableList<String>, deleteList: List<Int>): List<String> {

    // Sort the delete list in reverse order to avoid index shifting during deletion
    deleteList.sortedDescending().forEach { idx ->
        photos.removeAt(idx)
    }
    
    return photos
}
/**
 * Given a list of photos and a list of indexes to delete, remove the photos at the specified indexes.
 *
 * @param photos The list containing the original photos.
 * @param deleteList The list containing the indexes to be deleted.
 * @return The updated list of photos after deleting the specified indexes.
 *
 * Example:
 * deletePhotos(listOf("pic1", "pic2", "pic3", "pic4"), listOf(0, 2))
 * Output: ['pic2', 'pic4']
 */
fun deletePhotos(photos: MutableList<String>, deleteList: List<Int>): List<String> {
/**
 * Given a list of photos and a list of indexes to delete, remove the photos at the specified indexes.
 *
 * @param photos The list containing the original photos.
 * @param deleteList The list containing the indexes to be deleted.
 * @return The updated list of photos after deleting the specified indexes.
 *
 * Example:
 * deletePhotos(listOf("pic1", "pic2", "pic3", "pic4"), listOf(0, 2))
 * Output: ['pic2', 'pic4']
 */
fun deletePhotos(photos: MutableList<String>, deleteList: List<Int>): List<String> {

    // Sort the delete list in reverse order to avoid index shifting during deletion
    deleteList.sortedDescending().forEach { idx ->
        photos.removeAt(idx)
    }
    
    return photos
}