7. 理论讲解:堆栈、队列(Stack、Queue)

2018-11-23  本文已影响0人  博士伦2014
  1. Stack - First In First Out (FIFO)
    • Array or Linked List
  2. Queue - First In Last Out (FILO)
    • Array or Linked List

1. Stack

入栈与出栈

2. Queue

练习题目

  1. https://leetcode.com/problems/backspace-string-compare/description/
  2. https://leetcode.com/problems/implement-queue-using-stacks/solution/
  3. https://leetcode.com/problems/implement-stack-using-queues/description/
  4. https://leetcode.com/problems/valid-parentheses/description/
上一篇下一篇

猜你喜欢

热点阅读