hashmap
jialuyyy
这个作者很懒,什么都没留下…
展开
-
Writing a Key Value Store
Writing a Key Value StoreThe purpose of this exercise is to write a basic key value store. It should use string keys and string values only. The following operations should be supported:setget原创 2015-06-20 05:19:53 · 269 阅读 · 0 评论 -
Find k most repeating elements
Given a list and a number k, print out the top k most repeating elements in the list.1. Use hashmap to store the pair of number and count.2. Use priority queue to store the hash node based on原创 2015-06-05 02:15:25 · 234 阅读 · 0 评论 -
LRU Cache
LRU CacheDesign and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.get(key) - Get the value (will always be原创 2015-06-09 09:58:23 · 163 阅读 · 0 评论