Skip to content

Instantly share code, notes, and snippets.

@scwebd
Created March 2, 2020 17:07
Show Gist options
  • Select an option

  • Save scwebd/a69754631fd4357b8f395abb6dea1c9c to your computer and use it in GitHub Desktop.

Select an option

Save scwebd/a69754631fd4357b8f395abb6dea1c9c to your computer and use it in GitHub Desktop.

Revisions

  1. scwebd created this gist Mar 2, 2020.
    18 changes: 18 additions & 0 deletions examples
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    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