You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

LRUCache-test.cpp 392B

1234567891011121314151617181920
  1. #include <string>
  2. #include <iostream>
  3. #include "LRUCache.h"
  4. using namespace std;
  5. int main(int argc, char **argv) {
  6. LRUCache<string, int> lru(4);
  7. lru.insert("hello", new int(1));
  8. lru.insert("hi", 2);
  9. lru.insert("where", 3);
  10. lru.insert("are", 4);
  11. lru.insert("you", 5);
  12. lru.debug_cache();
  13. lru.find("where");
  14. std::cout << "------------" << std::endl;
  15. lru.debug_cache();
  16. return 0;
  17. }