/**
 * Given a list of albums and a file extension,
 * return the list of photos that have that extension in the specified album.
 *
 * @param album The list of albums
 * @param extension The file extension of the photos
 * @return A list of photos with the specified extension in the album
 */
fun getPhotosInAlbum(album: List<List<String>>, extension: String): List<String> {

    // Convert the extension to lowercase
    val ext = extension.toLowerCase()

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

    // Iterate over each album
    for (alb in album) {
        // Check if the album has photos
        if (alb is List<*>) {
            // Iterate over each photo in the album
            for (photo in alb) {
                // Check if the photo has the specified extension
                if (photo is String && photo.toLowerCase().endsWith(ext)) {
                    // Add the photo to the list
                    photos.add(photo)
                }
            }
        }
    }

    // Return the list of photos with the specified extension
    return photos
}
/**
 * Given a list of albums and a file extension,
 * return the list of photos that have that extension in the specified album.
 *
 * @param album The list of albums
 * @param extension The file extension of the photos
 * @return A list of photos with the specified extension in the album
 */
fun getPhotosInAlbum(album: List<List<String>>, extension: String): List<String> {
/**
 * Given a list of albums and a file extension,
 * return the list of photos that have that extension in the specified album.
 *
 * @param album The list of albums
 * @param extension The file extension of the photos
 * @return A list of photos with the specified extension in the album
 */
fun getPhotosInAlbum(album: List<List<String>>, extension: String): List<String> {

    // Convert the extension to lowercase
    val ext = extension.toLowerCase()

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

    // Iterate over each album
    for (alb in album) {
        // Check if the album has photos
        if (alb is List<*>) {
            // Iterate over each photo in the album
            for (photo in alb) {
                // Check if the photo has the specified extension
                if (photo is String && photo.toLowerCase().endsWith(ext)) {
                    // Add the photo to the list
                    photos.add(photo)
                }
            }
        }
    }

    // Return the list of photos with the specified extension
    return photos
}