/**
 * Given a list of events and a list of keywords, find the events that contain at least one keyword.
 *
 * @param events A list of events.
 * @param keywords A list of keywords.
 * @return A list of events that contain at least one keyword.
 *
 * Example:
 * events = ['World War II', 'American Revolution', 'French Revolution']
 * keywords = ['war', 'revolution']
 * findMatchingEvents(events, keywords) -> ['World War II', 'American Revolution', 'French Revolution']
 */
fun findMatchingEvents(events: List<String>, keywords: List<String>): List<String> {

    val matchingEvents = mutableListOf<String>()
    for (event in events) {
        if (keywords.any { keyword -> event.contains(keyword) }) {
            matchingEvents.add(event)
        }
    }
    return matchingEvents
}
/**
 * Given a list of events and a list of keywords, find the events that contain at least one keyword.
 *
 * @param events A list of events.
 * @param keywords A list of keywords.
 * @return A list of events that contain at least one keyword.
 *
 * Example:
 * events = ['World War II', 'American Revolution', 'French Revolution']
 * keywords = ['war', 'revolution']
 * findMatchingEvents(events, keywords) -> ['World War II', 'American Revolution', 'French Revolution']
 */
fun findMatchingEvents(events: List<String>, keywords: List<String>): List<String> {
/**
 * Given a list of events and a list of keywords, find the events that contain at least one keyword.
 *
 * @param events A list of events.
 * @param keywords A list of keywords.
 * @return A list of events that contain at least one keyword.
 *
 * Example:
 * events = ['World War II', 'American Revolution', 'French Revolution']
 * keywords = ['war', 'revolution']
 * findMatchingEvents(events, keywords) -> ['World War II', 'American Revolution', 'French Revolution']
 */
fun findMatchingEvents(events: List<String>, keywords: List<String>): List<String> {

    val matchingEvents = mutableListOf<String>()
    for (event in events) {
        if (keywords.any { keyword -> event.contains(keyword) }) {
            matchingEvents.add(event)
        }
    }
    return matchingEvents
}