/**
 * This function takes a dictionary as input and returns a list of all the duplicate keys present in the dictionary.
 *
 * Example:
 * val dictionary = mapOf('a' to 1, 'b' to 2, 'c' to 3, 'd' to 4, 'e' to 5, 'f' to 6, 'g' to 4)
 * getDuplicateKeys(dictionary) -> ['d']
 *
 * @param dictionary The dictionary to check for duplicate keys.
 * @return A list of duplicate keys found in the dictionary.
 */
fun getDuplicateKeys(dictionary: Map<String, Int>): List<String> {

    val keys = dictionary.keys.toList()
    val uniqueKeys = mutableSetOf<String>()
    val duplicateKeys = mutableListOf<String>()

    for (key in keys) {
        if (key in uniqueKeys) {
            duplicateKeys.add(key)
        } else {
            uniqueKeys.add(key)
        }
    }

    return duplicateKeys
}
/**
 * This function takes a dictionary as input and returns a list of all the duplicate keys present in the dictionary.
 *
 * Example:
 * val dictionary = mapOf('a' to 1, 'b' to 2, 'c' to 3, 'd' to 4, 'e' to 5, 'f' to 6, 'g' to 4)
 * getDuplicateKeys(dictionary) -> ['d']
 *
 * @param dictionary The dictionary to check for duplicate keys.
 * @return A list of duplicate keys found in the dictionary.
 */
fun getDuplicateKeys(dictionary: Map<String, Int>): List<String> {
/**
 * This function takes a dictionary as input and returns a list of all the duplicate keys present in the dictionary.
 *
 * Example:
 * val dictionary = mapOf('a' to 1, 'b' to 2, 'c' to 3, 'd' to 4, 'e' to 5, 'f' to 6, 'g' to 4)
 * getDuplicateKeys(dictionary) -> ['d']
 *
 * @param dictionary The dictionary to check for duplicate keys.
 * @return A list of duplicate keys found in the dictionary.
 */
fun getDuplicateKeys(dictionary: Map<String, Int>): List<String> {

    val keys = dictionary.keys.toList()
    val uniqueKeys = mutableSetOf<String>()
    val duplicateKeys = mutableListOf<String>()

    for (key in keys) {
        if (key in uniqueKeys) {
            duplicateKeys.add(key)
        } else {
            uniqueKeys.add(key)
        }
    }

    return duplicateKeys
}