/**
 * A police officer needs help removing certain criminals from a list of records.
 * The list contains records of criminals arrested by the officer.
 * Use a while loop to remove all the criminals specified in the criminalList.
 *
 * @param policeRecords A list of records containing information about criminals.
 * @param criminalList A list of criminals to be removed from the policeRecords.
 * @return The updated policeRecords list after removing the specified criminals.
 */
fun removingElementsFromList(policeRecords: MutableList<String>, criminalList: List<String>): MutableList<String> {

    var i = 0
    while (i < policeRecords.size) {
        if (policeRecords[i] in criminalList) {
            policeRecords.removeAt(i)
        } else {
            i++
        }
    }
    return policeRecords
}

// Example usage
/**
 * A police officer needs help removing certain criminals from a list of records.
 * The list contains records of criminals arrested by the officer.
 * Use a while loop to remove all the criminals specified in the criminalList.
 *
 * @param policeRecords A list of records containing information about criminals.
 * @param criminalList A list of criminals to be removed from the policeRecords.
 * @return The updated policeRecords list after removing the specified criminals.
 */
fun removingElementsFromList(policeRecords: MutableList<String>, criminalList: List<String>): MutableList<String> {
/**
 * A police officer needs help removing certain criminals from a list of records.
 * The list contains records of criminals arrested by the officer.
 * Use a while loop to remove all the criminals specified in the criminalList.
 *
 * @param policeRecords A list of records containing information about criminals.
 * @param criminalList A list of criminals to be removed from the policeRecords.
 * @return The updated policeRecords list after removing the specified criminals.
 */
fun removingElementsFromList(policeRecords: MutableList<String>, criminalList: List<String>): MutableList<String> {

    var i = 0
    while (i < policeRecords.size) {
        if (policeRecords[i] in criminalList) {
            policeRecords.removeAt(i)
        } else {
            i++
        }
    }
    return policeRecords
}

// Example usage