/**
 * This exercise aims to merge two strings and terminate the while loop when a certain condition is met.
 *
 * The function takes in two lists of strings, strings1 and strings2, and merges them into a single string.
 * The while loop continues until the total number of characters in the merged string is greater than 100.
 * At this point, the loop should exit and return the merged string.
 *
 * @param strings1 The first list of strings.
 * @param strings2 The second list of strings.
 * @return The merged string.
 */
fun mergeStrings(strings1: List<String>, strings2: List<String>): String {

    var mergedString = ""
    var index1 = 0
    var index2 = 0

    while (mergedString.length <= 100) {
        if (index1 < strings1.size) {
            mergedString += strings1[index1]
            index1++
        } else {
            break
        }

        if (index2 < strings2.size) {
            mergedString += strings2[index2]
            index2++
        } else {
            break
        }
    }

    return mergedString
}
/**
 * This exercise aims to merge two strings and terminate the while loop when a certain condition is met.
 *
 * The function takes in two lists of strings, strings1 and strings2, and merges them into a single string.
 * The while loop continues until the total number of characters in the merged string is greater than 100.
 * At this point, the loop should exit and return the merged string.
 *
 * @param strings1 The first list of strings.
 * @param strings2 The second list of strings.
 * @return The merged string.
 */
fun mergeStrings(strings1: List<String>, strings2: List<String>): String {
/**
 * This exercise aims to merge two strings and terminate the while loop when a certain condition is met.
 *
 * The function takes in two lists of strings, strings1 and strings2, and merges them into a single string.
 * The while loop continues until the total number of characters in the merged string is greater than 100.
 * At this point, the loop should exit and return the merged string.
 *
 * @param strings1 The first list of strings.
 * @param strings2 The second list of strings.
 * @return The merged string.
 */
fun mergeStrings(strings1: List<String>, strings2: List<String>): String {

    var mergedString = ""
    var index1 = 0
    var index2 = 0

    while (mergedString.length <= 100) {
        if (index1 < strings1.size) {
            mergedString += strings1[index1]
            index1++
        } else {
            break
        }

        if (index2 < strings2.size) {
            mergedString += strings2[index2]
            index2++
        } else {
            break
        }
    }

    return mergedString
}