/**
 * Given a list of police records and a suspect's name,
 * return a list of police records containing an intersection of characters with the suspect's name.
 *
 * @param policeRecord List of police records
 * @param suspect Name of the suspect
 * @return List of police records containing an intersection of characters with the suspect's name
 */
fun listIntersection(policeRecord: List<String>, suspect: String): List<String> {

    // Create an empty list to store the matching police records
    val matchingRecords = mutableListOf<String>()

    // Iterate over each police record
    for (record in policeRecord) {
        // Check if the suspect's name is in the police record
        if (record.length >= suspect.length && suspect in record) {
            // If the suspect's name is in the police record,
            // add it to the list of matching records
            matchingRecords.add(record)
        }
    }

    return matchingRecords
}
/**
 * Given a list of police records and a suspect's name,
 * return a list of police records containing an intersection of characters with the suspect's name.
 *
 * @param policeRecord List of police records
 * @param suspect Name of the suspect
 * @return List of police records containing an intersection of characters with the suspect's name
 */
fun listIntersection(policeRecord: List<String>, suspect: String): List<String> {
/**
 * Given a list of police records and a suspect's name,
 * return a list of police records containing an intersection of characters with the suspect's name.
 *
 * @param policeRecord List of police records
 * @param suspect Name of the suspect
 * @return List of police records containing an intersection of characters with the suspect's name
 */
fun listIntersection(policeRecord: List<String>, suspect: String): List<String> {

    // Create an empty list to store the matching police records
    val matchingRecords = mutableListOf<String>()

    // Iterate over each police record
    for (record in policeRecord) {
        // Check if the suspect's name is in the police record
        if (record.length >= suspect.length && suspect in record) {
            // If the suspect's name is in the police record,
            // add it to the list of matching records
            matchingRecords.add(record)
        }
    }

    return matchingRecords
}