Skip to content

Instantly share code, notes, and snippets.

@scwebd
Created March 2, 2020 17:07
Show Gist options
  • Save scwebd/a69754631fd4357b8f395abb6dea1c9c to your computer and use it in GitHub Desktop.
Save scwebd/a69754631fd4357b8f395abb6dea1c9c to your computer and use it in GitHub Desktop.
Stacks:
>> Achieving an undo operation
>> Browser/app back button
>> Error stacks in JS
>> Calling a function inside a function (it pushes the current data -- local variables, etc -- onto the stack to be retrieved once the control is returned)
Queues:
>> Call Center phone systems (to hold incoming callers in line, until a service rep is free)
>> CPU scheduling, Disk Scheduling: When multiple processes require CPU at the same time, various CPU scheduling algorithms are used which are implemented using a queue data structure.
>> Breadth First search in a graph
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment