/**
 * Given a list of police records and a list of arrest records, delete the elements from the police_records
 * that exist in the arrest_records and concatenate the remaining elements of the police_records into a single string.
 *
 * @param policeRecords List of strings representing police records.
 * @param arrestRecords List of strings representing arrest records.
 * @return A string formed by concatenating the remaining elements of the policeRecords list.
 *
 * Example:
 * deleteElementsAndConcatenateStrings(listOf("John", "David", "Henry", "Richard"), listOf("David", "Richard"))
 * Output: "JohnHenry"
 */
fun deleteElementsAndConcatenateStrings(policeRecords: List<String>, arrestRecords: List<String>): String {

    // Deleting elements from policeRecords that exist in arrestRecords
    val remainingRecords = policeRecords.filterNot { it in arrestRecords }

    // Concatenating the remaining elements into a single string
    return remainingRecords.joinToString("")
}
/**
 * Given a list of police records and a list of arrest records, delete the elements from the police_records
 * that exist in the arrest_records and concatenate the remaining elements of the police_records into a single string.
 *
 * @param policeRecords List of strings representing police records.
 * @param arrestRecords List of strings representing arrest records.
 * @return A string formed by concatenating the remaining elements of the policeRecords list.
 *
 * Example:
 * deleteElementsAndConcatenateStrings(listOf("John", "David", "Henry", "Richard"), listOf("David", "Richard"))
 * Output: "JohnHenry"
 */
fun deleteElementsAndConcatenateStrings(policeRecords: List<String>, arrestRecords: List<String>): String {
/**
 * Given a list of police records and a list of arrest records, delete the elements from the police_records
 * that exist in the arrest_records and concatenate the remaining elements of the police_records into a single string.
 *
 * @param policeRecords List of strings representing police records.
 * @param arrestRecords List of strings representing arrest records.
 * @return A string formed by concatenating the remaining elements of the policeRecords list.
 *
 * Example:
 * deleteElementsAndConcatenateStrings(listOf("John", "David", "Henry", "Richard"), listOf("David", "Richard"))
 * Output: "JohnHenry"
 */
fun deleteElementsAndConcatenateStrings(policeRecords: List<String>, arrestRecords: List<String>): String {

    // Deleting elements from policeRecords that exist in arrestRecords
    val remainingRecords = policeRecords.filterNot { it in arrestRecords }

    // Concatenating the remaining elements into a single string
    return remainingRecords.joinToString("")
}