LRU Cache

Design a Least Recently Used cache that supports get and put in O(1).

Examples
Input: [["LRUCache","put","put","get","put","get","put","get","get","get"],[[2],[1,1],[2,2],[1],[3,3],[2],[4,4],[1],[3],[4]]]
Output: [null,null,null,1,null,-1,null,-1,3,4]
Hints

LRU Cache

Design a Least Recently Used cache that supports get and put in O(1).