Basics:

DFS: Stack

BFS: Queue

TreeMap: 又想知道最小值,又想支持修改和删除

Stack:

  • 利用栈暂且保存有效信息 min stack
  • 翻转栈的运用 implement queue by 2 stacks
  • 单调栈 largest rectangle

Problems:

min stack: http://www.lintcode.com/en/problem/min-stack/

largest rectangle in histogram: http://www.lintcode.com/en/problem/largest-rectangle-in-histogram/

maximal rectangle: http://www.lintcode.com/en/problem/maximal-rectangle/

  • similar to histogram

max tree: http://www.lintcode.com/en/problem/max-tree/

implement stack by two queues: http://www.lintcode.com/en/problem/implement-stack-by-two-queues/

implement queue by two stacks: http://www.lintcode.com/en/problem/implement-queue-by-two-stacks/

building outline: http://www.lintcode.com/problem/building-outline/

top k frequent words: http://www.lintcode.com/problem/top-k-frequent-words/

trapping rain water

trapping rain water ii

results matching ""

    No results matching ""