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 — Java/DataStructures/Stacks/README.md at master · JavaInCloud/Java

Expand file tree

/

README.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
21 lines (11 loc) · 654 Bytes
/

README.md

Copy path

File metadata and controls

21 lines (11 loc) · 654 Bytes
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

STACK

stack is an ADT (abstract data type ) that act like list of objects but there is a diffrents.

stack act is LIFO (Last In First Out), it means that when we want to get an element from the stack we get the last element in the stack.

stack is bast on two methods ( functions)

push & pop

push: add an alement to last index of stack.

for example: we have 1, 3, 5 in stack, then we call push(9),

9 will add to last index of stack -> 1, 3, 5 , 9

pop: remove the last element from stack. for example: we have 1, 3, 5 , 9 in stack, then we call pop(),

the function will return 9 and the stack will change to 1, 3, 5.

You are visitor 01402520 — 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.