Linear data structure
- Queue used for BFS most of time
- O(1) for push
- O(1) for Pop
- O(1) for Top
- Stack
- O(1) for push
- O(1) for pop
- O(1) for top
[LeetCode] 155. Min Stack_Easy tag: stack
[LeetCode] 232. Implement Queue using Stacks_Easy tag: stack
- Hash
Tree data structure
- Heap
原文地址:https://www.cnblogs.com/Johnsonxiong/p/10854576.html
时间: 2024-10-09 03:53:54