/**
 * Given a range of numbers and a dictionary, this function finds the keys in the dictionary that lie within the given range.
 *
 * @param rangeStart The start of the range.
 * @param rangeEnd The end of the range.
 * @param dictionary The dictionary to process.
 * @return A list of keys in the dictionary that are within the given range.
 */
fun accessDictionaryItems(rangeStart: Int, rangeEnd: Int, dictionary: Map<Int, String>): List<Int> {

    // Create an empty list to store the matching keys
    val matchingKeys = mutableListOf<Int>()

    // Iterate over the given range
    for (num in rangeStart..rangeEnd) {
        // Check if the number is present as a key in the dictionary
        if (num in dictionary.keys) {
            // If yes, append the key to the matchingKeys list
            matchingKeys.add(num)
        }
    }

    return matchingKeys
}
/**
 * Given a range of numbers and a dictionary, this function finds the keys in the dictionary that lie within the given range.
 *
 * @param rangeStart The start of the range.
 * @param rangeEnd The end of the range.
 * @param dictionary The dictionary to process.
 * @return A list of keys in the dictionary that are within the given range.
 */
fun accessDictionaryItems(rangeStart: Int, rangeEnd: Int, dictionary: Map<Int, String>): List<Int> {
/**
 * Given a range of numbers and a dictionary, this function finds the keys in the dictionary that lie within the given range.
 *
 * @param rangeStart The start of the range.
 * @param rangeEnd The end of the range.
 * @param dictionary The dictionary to process.
 * @return A list of keys in the dictionary that are within the given range.
 */
fun accessDictionaryItems(rangeStart: Int, rangeEnd: Int, dictionary: Map<Int, String>): List<Int> {

    // Create an empty list to store the matching keys
    val matchingKeys = mutableListOf<Int>()

    // Iterate over the given range
    for (num in rangeStart..rangeEnd) {
        // Check if the number is present as a key in the dictionary
        if (num in dictionary.keys) {
            // If yes, append the key to the matchingKeys list
            matchingKeys.add(num)
        }
    }

    return matchingKeys
}