摘要:
缓存算法(页面置换算法)-FIFO、LFU、LRU 在前一篇文章中通过leetcode的一道题目了解了LRU算法的具体设计思路,下面继续来探讨一下另外两种常见的Cache算法:FIFO、LFU 1.FIFO算法 FIFO(First in First out),先进先出。其实在操作系统的设计理念中很 阅读全文
摘要:
LRU Cache题目链接:https://oj.leetcode.com/problems/lru-cache/Design and implement a data structure for Least Recently Used (LRU) cache. It should support ... 阅读全文
摘要:
Max Points on a Line题目链接:http://oj.leetcode.com/problems/max-points-on-a-line/ Givennpoints on a 2D plane, find the maximum number of points that lie... 阅读全文
摘要:
Evaluate Reverse Polish Notation题目链接:http://oj.leetcode.com/problems/evaluate-reverse-polish-notation/ Evaluate the value of an arithmetic expression... 阅读全文
摘要:
Reverse Words in a String题目链接:http://oj.leetcode.com/problems/reverse-words-in-a-string/ Given an input string, reverse the string word by word. F... 阅读全文