/**
 * This exercise aims to find keywords within a list of words.
 *
 * Complete the findKeywords function that takes a list of words and a keyword as parameters.
 * The function should return true if the keyword is present in the list of words, otherwise, it should return false.
 * It should also implement short-circuiting to optimize the search process.
 *
 * @param words A list of words (strings).
 * @param keyword A word to search for within the list.
 * @return true if the keyword is found in the list of words, otherwise false.
 */
fun findKeywords(words: List<String>, keyword: String): Boolean {

    // Iterate over each word in the list
    for (word in words) {
        if (word == keyword) {
            return true  // Since the keyword is found, return true immediately without further iteration
        }
    }
    return false  // If keyword not found after iterating through all words, return false
}
/**
 * This exercise aims to find keywords within a list of words.
 *
 * Complete the findKeywords function that takes a list of words and a keyword as parameters.
 * The function should return true if the keyword is present in the list of words, otherwise, it should return false.
 * It should also implement short-circuiting to optimize the search process.
 *
 * @param words A list of words (strings).
 * @param keyword A word to search for within the list.
 * @return true if the keyword is found in the list of words, otherwise false.
 */
fun findKeywords(words: List<String>, keyword: String): Boolean {
/**
 * This exercise aims to find keywords within a list of words.
 *
 * Complete the findKeywords function that takes a list of words and a keyword as parameters.
 * The function should return true if the keyword is present in the list of words, otherwise, it should return false.
 * It should also implement short-circuiting to optimize the search process.
 *
 * @param words A list of words (strings).
 * @param keyword A word to search for within the list.
 * @return true if the keyword is found in the list of words, otherwise false.
 */
fun findKeywords(words: List<String>, keyword: String): Boolean {

    // Iterate over each word in the list
    for (word in words) {
        if (word == keyword) {
            return true  // Since the keyword is found, return true immediately without further iteration
        }
    }
    return false  // If keyword not found after iterating through all words, return false
}