> On Jun 26, 2019, at 6:40 AM, mhysnm1...@gmail.com wrote:
> 
> All,
> 
> 
> 
> General computer science question for data structures.
> 
> When would you use the below structures and why? If you can provide a real
> life example on when they would be used in a program  This would be great. I
> am not after code, just explanation.
> 

One of the most useful (to me) structures is the double-ended queue ("from 
collections import deque”).  It creates a queue that can quickly remove an item 
from one end and add an item to the other.  Particularly useful for displaying 
a sliding window into time series data, or a moving track of the most recent n 
observations of a physical measurement.

Bill

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to