/**
 * Given a list of lyrics, concatenate the lyrics between the start index
 * (inclusive) and end index (exclusive) and return the result.
 *
 * @param lyricsList A list of strings representing the lyrics of a song.
 * @param startIndex An integer representing the index to start slicing from.
 * @param endIndex An integer representing the index to end slicing at.
 * @return A string representing the concatenated lyrics.
 */
fun concatenateLyrics(lyricsList: List<String>, startIndex: Int, endIndex: Int): String {

    // Initialize an empty string to store the concatenated lyrics
    var concatenatedLyrics = ""

    // Iterate over each line of lyrics using a nested loop
    for (line in lyricsList) {
        for (char in line) {  // Iterate over each character in the line
            // Append the character to the concatenatedLyrics string
            concatenatedLyrics += char
        }
    }

    // Return the sliced lyrics using the startIndex and endIndex
    return concatenatedLyrics.substring(startIndex, endIndex)
}
/**
 * Given a list of lyrics, concatenate the lyrics between the start index
 * (inclusive) and end index (exclusive) and return the result.
 *
 * @param lyricsList A list of strings representing the lyrics of a song.
 * @param startIndex An integer representing the index to start slicing from.
 * @param endIndex An integer representing the index to end slicing at.
 * @return A string representing the concatenated lyrics.
 */
fun concatenateLyrics(lyricsList: List<String>, startIndex: Int, endIndex: Int): String {
/**
 * Given a list of lyrics, concatenate the lyrics between the start index
 * (inclusive) and end index (exclusive) and return the result.
 *
 * @param lyricsList A list of strings representing the lyrics of a song.
 * @param startIndex An integer representing the index to start slicing from.
 * @param endIndex An integer representing the index to end slicing at.
 * @return A string representing the concatenated lyrics.
 */
fun concatenateLyrics(lyricsList: List<String>, startIndex: Int, endIndex: Int): String {

    // Initialize an empty string to store the concatenated lyrics
    var concatenatedLyrics = ""

    // Iterate over each line of lyrics using a nested loop
    for (line in lyricsList) {
        for (char in line) {  // Iterate over each character in the line
            // Append the character to the concatenatedLyrics string
            concatenatedLyrics += char
        }
    }

    // Return the sliced lyrics using the startIndex and endIndex
    return concatenatedLyrics.substring(startIndex, endIndex)
}