Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
heavenlyblue
on May 8, 2020
|
parent
|
context
|
favorite
| on:
Ask HN: Do you ever go back and admire a piece of ...
You should really use deque for the stack
delaaxe
on May 8, 2020
|
next
[–]
It's what I did in other parts of the project but I haven't noticed any performance increase. I guess standard lists are already fast enough for implementing stacks.
nivethan
on May 8, 2020
|
prev
[–]
Why?
comfydragon
on May 8, 2020
|
parent
[–]
Probably just an efficiency argument, since deque is designed to be efficient when used as a stack/queue.
https://docs.python.org/3.8/library/collections.html#collect...
Consider applying for YC's Spring batch! Applications are open till Feb 11.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: