/**
 * This function takes in two sets: 'criminals" and 'arrested`.
 * It returns a set containing the criminals that are both in 'criminals" and 'arrested`.
 *
 * Your task is to complete the code by using a loop and the simple assignment operator.
 */
fun calculateCommonCriminals(criminals: Set<String>, arrested: Set<String>): Set<String> {

    // Initialize an empty set to store common criminals
    val commonCriminals = mutableSetOf<String>()

    // Iterate over each criminal in the 'criminals" set
    for (criminal in criminals) {
        // Check if the criminal is also in the 'arrested" set
        if (criminal in arrested) {
            // Add the criminal to the 'commonCriminals" set
            commonCriminals.add(criminal)
        }
    }

    // Return the set of common criminals
    return commonCriminals
}

// Example usage
/**
 * This function takes in two sets: 'criminals" and 'arrested`.
 * It returns a set containing the criminals that are both in 'criminals" and 'arrested`.
 *
 * Your task is to complete the code by using a loop and the simple assignment operator.
 */
fun calculateCommonCriminals(criminals: Set<String>, arrested: Set<String>): Set<String> {
/**
 * This function takes in two sets: 'criminals" and 'arrested`.
 * It returns a set containing the criminals that are both in 'criminals" and 'arrested`.
 *
 * Your task is to complete the code by using a loop and the simple assignment operator.
 */
fun calculateCommonCriminals(criminals: Set<String>, arrested: Set<String>): Set<String> {

    // Initialize an empty set to store common criminals
    val commonCriminals = mutableSetOf<String>()

    // Iterate over each criminal in the 'criminals" set
    for (criminal in criminals) {
        // Check if the criminal is also in the 'arrested" set
        if (criminal in arrested) {
            // Add the criminal to the 'commonCriminals" set
            commonCriminals.add(criminal)
        }
    }

    // Return the set of common criminals
    return commonCriminals
}

// Example usage