/**
 * Given a list of data and a list of strings, append each element of the data list
 * to the original list and concatenate all the strings together. Return the final string.
 * Note: Both lists will have the same length.
 *
 * @param data A list of data elements.
 * @param strings A list of strings.
 * @return The final concatenated string.
 *
 * Example:
 * appendAndConcatenate(listOf(1, 2, 3), listOf("a", "b", "c")) returns "a1b2c3"
 */
fun appendAndConcatenate(data: List<Int>, strings: List<String>): String {

    // Initialize an empty string to store the concatenated result
    var resultStr = ""

    // Iterate through both lists simultaneously using zip
    for ((d, s) in data.zip(strings)) {
        // Append the current data element to the list
        // Note: In Kotlin, lists are immutable, so we cannot directly append to them
        // We will concatenate the elements to a new list instead
        // data.add(d)

        // Concatenate the string with the current data element
        resultStr += s + d.toString()
    }

    return resultStr
}
/**
 * Given a list of data and a list of strings, append each element of the data list
 * to the original list and concatenate all the strings together. Return the final string.
 * Note: Both lists will have the same length.
 *
 * @param data A list of data elements.
 * @param strings A list of strings.
 * @return The final concatenated string.
 *
 * Example:
 * appendAndConcatenate(listOf(1, 2, 3), listOf("a", "b", "c")) returns "a1b2c3"
 */
fun appendAndConcatenate(data: List<Int>, strings: List<String>): String {
/**
 * Given a list of data and a list of strings, append each element of the data list
 * to the original list and concatenate all the strings together. Return the final string.
 * Note: Both lists will have the same length.
 *
 * @param data A list of data elements.
 * @param strings A list of strings.
 * @return The final concatenated string.
 *
 * Example:
 * appendAndConcatenate(listOf(1, 2, 3), listOf("a", "b", "c")) returns "a1b2c3"
 */
fun appendAndConcatenate(data: List<Int>, strings: List<String>): String {

    // Initialize an empty string to store the concatenated result
    var resultStr = ""

    // Iterate through both lists simultaneously using zip
    for ((d, s) in data.zip(strings)) {
        // Append the current data element to the list
        // Note: In Kotlin, lists are immutable, so we cannot directly append to them
        // We will concatenate the elements to a new list instead
        // data.add(d)

        // Concatenate the string with the current data element
        resultStr += s + d.toString()
    }

    return resultStr
}