GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Algorithm-in-JavaScript/Stack at master · rohan-paul/Algorithm-in-JavaScript

Expand file tree

/

Stack

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

Stack

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
README.md
README.md
 
 
stack-class-basic-implemetation-2.js
stack-class-basic-implemetation-2.js
 
 
stack-class-basic-implemetation.js
stack-class-basic-implemetation.js
 
 
stack-generic-class-with-parenthesis-matching.js
stack-generic-class-with-parenthesis-matching.js
 
 
stack-postFix.js
stack-postFix.js
 
 

README.md

Outline

Stack

In computer science, a stack is an abstract data type that serves as a collection of elements, with two principal operations:

  • push, which adds an element to the collection, and
  • pop, which removes the most recently added element that was not yet removed. The order in which elements come off a stack gives rise to its alternative name, LIFO (last in, first out). Additionally, a peek operation may give access to the top without modifying the stack. The name "stack" for this type of structure comes from the analogy to a set of physical items stacked on top of each other, which makes it easy to take an item off the top of the stack, while getting to an item deeper in the stack may require taking off multiple other items first Simple representation of a stack runtime with push and pop operations. Stack

References

  • Wikipedia
  • YouTube

ways for adding element in stack:

push(elem) method

pop()

pop - Takes top element from the stack.

peek()

peek - Peeks at the top element of the stack.

size

size - Returns the size of the stack.

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.