vimwiki/tech/queue.wiki

21 lines
433 B
Plaintext
Raw Normal View History

2021-09-23 03:33:54 +00:00
= Queue =
A literal ordered queue. Keep an order of elements and only push on and remove
from the back
== Good For ==
* Keeping an order of elements
== Bad For ==
* Everything else
2021-09-23 17:54:24 +00:00
== Optimize ==
Only implement this as a linked list, as all insert and removal (which is the
only operation queues have really), will be in O(1) time. Really fast, just no
cache optimizations, but its _usually_ a valid trade-off
2021-09-23 03:33:54 +00:00
[[algorithms]]