/**
 * This exercise tests your understanding of the NOT operator and string concatenation.
 * The function takes in two strings, string1 and string2, and should concatenate them together.
 * However, if either string1 or string2 is empty or null, the function should return "Invalid input".
 * Additionally, if string1 is a substring of string2 or vice versa, the function should return "Intersection found".
 * Otherwise, the function should concatenate string1 and string2 and return the result.
 *
 * @param string1 The first string
 * @param string2 The second string
 * @return The concatenated string, "Intersection found", or "Invalid input"
 */
fun notAndStringConcatenation(string1: String?, string2: String?): String {

    if (string1.isNullOrEmpty() || string2.isNullOrEmpty()) {
        return "Invalid input"
    }

    if (string1 in string2 || string2 in string1) {
        return "Intersection found"
    }

    return string1 + string2
}
/**
 * This exercise tests your understanding of the NOT operator and string concatenation.
 * The function takes in two strings, string1 and string2, and should concatenate them together.
 * However, if either string1 or string2 is empty or null, the function should return "Invalid input".
 * Additionally, if string1 is a substring of string2 or vice versa, the function should return "Intersection found".
 * Otherwise, the function should concatenate string1 and string2 and return the result.
 *
 * @param string1 The first string
 * @param string2 The second string
 * @return The concatenated string, "Intersection found", or "Invalid input"
 */
fun notAndStringConcatenation(string1: String?, string2: String?): String {
/**
 * This exercise tests your understanding of the NOT operator and string concatenation.
 * The function takes in two strings, string1 and string2, and should concatenate them together.
 * However, if either string1 or string2 is empty or null, the function should return "Invalid input".
 * Additionally, if string1 is a substring of string2 or vice versa, the function should return "Intersection found".
 * Otherwise, the function should concatenate string1 and string2 and return the result.
 *
 * @param string1 The first string
 * @param string2 The second string
 * @return The concatenated string, "Intersection found", or "Invalid input"
 */
fun notAndStringConcatenation(string1: String?, string2: String?): String {

    if (string1.isNullOrEmpty() || string2.isNullOrEmpty()) {
        return "Invalid input"
    }

    if (string1 in string2 || string2 in string1) {
        return "Intersection found"
    }

    return string1 + string2
}