Stack & Queue
Queue
Operations:
push:
O(1)
pop:
O(1)
Top:
O(1)
Always used for BFS
Stack
Operations:
push:
O(1)
pop:
O(1)
Top:
O(1)
Last updated
Operations:
push: O(1)
pop: O(1)
Top: O(1)
Always used for BFS
Operations:
push: O(1)
pop: O(1)
Top: O(1)
Last updated