/**
 * This function takes a data structure and converts it to a set. Then, it changes the value of
 * an element at a specific index of the set.
 *
 * @param dataStructure The data structure to be converted (e.g., list, tuple, dictionary, etc.)
 * @param element The new value to be assigned to the element at the specified index
 * @param index The index of the element to be changed
 * @return The modified set
 */
fun convertElementsToSet(dataStructure: Collection<Any>, element: Any, index: Int): Set<Any> {

    // Convert the data structure to a set
    val setData = dataStructure.toSet()

    // Change the element at the specified index
    val setDataList = setData.toMutableList() // Convert set back to list to modify an element
    setDataList[index] = element

    // Convert the modified list back to a set
    return setDataList.toSet()
}
/**
 * This function takes a data structure and converts it to a set. Then, it changes the value of
 * an element at a specific index of the set.
 *
 * @param dataStructure The data structure to be converted (e.g., list, tuple, dictionary, etc.)
 * @param element The new value to be assigned to the element at the specified index
 * @param index The index of the element to be changed
 * @return The modified set
 */
fun convertElementsToSet(dataStructure: Collection<Any>, element: Any, index: Int): Set<Any> {
/**
 * This function takes a data structure and converts it to a set. Then, it changes the value of
 * an element at a specific index of the set.
 *
 * @param dataStructure The data structure to be converted (e.g., list, tuple, dictionary, etc.)
 * @param element The new value to be assigned to the element at the specified index
 * @param index The index of the element to be changed
 * @return The modified set
 */
fun convertElementsToSet(dataStructure: Collection<Any>, element: Any, index: Int): Set<Any> {

    // Convert the data structure to a set
    val setData = dataStructure.toSet()

    // Change the element at the specified index
    val setDataList = setData.toMutableList() // Convert set back to list to modify an element
    setDataList[index] = element

    // Convert the modified list back to a set
    return setDataList.toSet()
}