/**
 * This function takes a list of strings and two keywords as input, and returns a new list of strings
 * that contain the intersection of the two keywords using the 'AND' and 'NOT' operators.
 *
 * @param data List of strings to search within.
 * @param keyword1 First keyword to be included in the search results.
 * @param keyword2 Second keyword to be included in the search results.
 * @return A new list of strings containing the intersection of the two keywords using 'AND' and 'NOT' operators.
 */
fun searchData(data: List<String>, keyword1: String, keyword2: String): List<String> {

    val results = mutableListOf<String>()
    
    for (item in data) {
        if (keyword1 in item && keyword2 !in item) {  // Intersection of 'AND' and 'NOT'
            results.add(item)
        }
    }
    
    return results
}

// Sample usage
val myData = listOf(
    "Marketing strategies",
    "Sales and marketing",
    "Digital marketing",
    "Marketing specialist",
    "Content creation",
    "Marketing tactics",
    "Marketing success",
    "Marketing tools",
    "Marketing campaign",
    "Marketing objectives"
)

val searchResults = searchData(myData, "Marketing", "strategies")
/**
 * This function takes a list of strings and two keywords as input, and returns a new list of strings
 * that contain the intersection of the two keywords using the 'AND' and 'NOT' operators.
 *
 * @param data List of strings to search within.
 * @param keyword1 First keyword to be included in the search results.
 * @param keyword2 Second keyword to be included in the search results.
 * @return A new list of strings containing the intersection of the two keywords using 'AND' and 'NOT' operators.
 */
fun searchData(data: List<String>, keyword1: String, keyword2: String): List<String> {
/**
 * This function takes a list of strings and two keywords as input, and returns a new list of strings
 * that contain the intersection of the two keywords using the 'AND' and 'NOT' operators.
 *
 * @param data List of strings to search within.
 * @param keyword1 First keyword to be included in the search results.
 * @param keyword2 Second keyword to be included in the search results.
 * @return A new list of strings containing the intersection of the two keywords using 'AND' and 'NOT' operators.
 */
fun searchData(data: List<String>, keyword1: String, keyword2: String): List<String> {

    val results = mutableListOf<String>()
    
    for (item in data) {
        if (keyword1 in item && keyword2 !in item) {  // Intersection of 'AND' and 'NOT'
            results.add(item)
        }
    }
    
    return results
}

// Sample usage
val myData = listOf(
    "Marketing strategies",
    "Sales and marketing",
    "Digital marketing",
    "Marketing specialist",
    "Content creation",
    "Marketing tactics",
    "Marketing success",
    "Marketing tools",
    "Marketing campaign",
    "Marketing objectives"
)

val searchResults = searchData(myData, "Marketing", "strategies")