/**
 * This exercise focuses on adding elements to a set and comparing them with other values.
 *
 * Given a set of journalists and a list of values, the function adds each value to the set and returns a list
 * indicating whether each value is already present in the set or not.
 *
 * @param journalistSet A set of journalist names.
 * @param values A list of values to be added and compared with the journalistSet.
 * @return A list indicating whether each value is already present in the journalistSet or not.
 */
fun addElementsAndCompare(journalistSet: MutableSet<String>, values: List<String>): List<String> {

    val result = mutableListOf<String>()
    
    // Iterate through the values list
    for (value in values) {
        // Add each value to the journalistSet
        journalistSet.add(value)
        
        // Check if the value is already present in the journalistSet
        if (value in journalistSet) {
            result.add("$value is already in the set")
        } else {
            result.add("$value is not in the set")
        }
    }
    
    return result
}
/**
 * This exercise focuses on adding elements to a set and comparing them with other values.
 *
 * Given a set of journalists and a list of values, the function adds each value to the set and returns a list
 * indicating whether each value is already present in the set or not.
 *
 * @param journalistSet A set of journalist names.
 * @param values A list of values to be added and compared with the journalistSet.
 * @return A list indicating whether each value is already present in the journalistSet or not.
 */
fun addElementsAndCompare(journalistSet: MutableSet<String>, values: List<String>): List<String> {
/**
 * This exercise focuses on adding elements to a set and comparing them with other values.
 *
 * Given a set of journalists and a list of values, the function adds each value to the set and returns a list
 * indicating whether each value is already present in the set or not.
 *
 * @param journalistSet A set of journalist names.
 * @param values A list of values to be added and compared with the journalistSet.
 * @return A list indicating whether each value is already present in the journalistSet or not.
 */
fun addElementsAndCompare(journalistSet: MutableSet<String>, values: List<String>): List<String> {

    val result = mutableListOf<String>()
    
    // Iterate through the values list
    for (value in values) {
        // Add each value to the journalistSet
        journalistSet.add(value)
        
        // Check if the value is already present in the journalistSet
        if (value in journalistSet) {
            result.add("$value is already in the set")
        } else {
            result.add("$value is not in the set")
        }
    }
    
    return result
}