/**
 * This function takes a list of cases and a list of keywords, and returns a list of cases that contain at least one of the keywords.
 *
 * @param cases a list of strings representing different court cases
 * @param keywords a list of strings representing different legal terms
 * @return a list of strings representing cases that contain at least one of the keywords
 *
 * Example:
 * cases = ["Smith v. Jones", "Johnson v. Johnson", "Doe v. Roe"]
 * keywords = ["intentional tort", "breach of contract", "negligence"]
 * findRelatedCases(cases, keywords) -> ['Smith v. Jones', 'Doe v. Roe']
 */
fun findRelatedCases(cases: List<String>, keywords: List<String>): List<String> {

    val relevantCases = mutableListOf<String>()
    for (case in cases) {
        for (keyword in keywords) {
            if (case.contains(keyword)) {
                relevantCases.add(case)
                break
            }
        }
    }
    return relevantCases
}
/**
 * This function takes a list of cases and a list of keywords, and returns a list of cases that contain at least one of the keywords.
 *
 * @param cases a list of strings representing different court cases
 * @param keywords a list of strings representing different legal terms
 * @return a list of strings representing cases that contain at least one of the keywords
 *
 * Example:
 * cases = ["Smith v. Jones", "Johnson v. Johnson", "Doe v. Roe"]
 * keywords = ["intentional tort", "breach of contract", "negligence"]
 * findRelatedCases(cases, keywords) -> ['Smith v. Jones', 'Doe v. Roe']
 */
fun findRelatedCases(cases: List<String>, keywords: List<String>): List<String> {
/**
 * This function takes a list of cases and a list of keywords, and returns a list of cases that contain at least one of the keywords.
 *
 * @param cases a list of strings representing different court cases
 * @param keywords a list of strings representing different legal terms
 * @return a list of strings representing cases that contain at least one of the keywords
 *
 * Example:
 * cases = ["Smith v. Jones", "Johnson v. Johnson", "Doe v. Roe"]
 * keywords = ["intentional tort", "breach of contract", "negligence"]
 * findRelatedCases(cases, keywords) -> ['Smith v. Jones', 'Doe v. Roe']
 */
fun findRelatedCases(cases: List<String>, keywords: List<String>): List<String> {

    val relevantCases = mutableListOf<String>()
    for (case in cases) {
        for (keyword in keywords) {
            if (case.contains(keyword)) {
                relevantCases.add(case)
                break
            }
        }
    }
    return relevantCases
}