End of Year Sale: Use Coupon Code END2025 to Get Extra 25% Off.
get operation, return the value associated with the key if it exists, and move the key to the end to mark it as recently used. If the key does not exist, return -1.put operation, insert the key-value pair into the dictionary. If the key already exists, update the value and move the key to the end. If adding a new key exceeds the capacity, remove the first key-value pair from the dictionary.