Skip to content

Documentation and my practice on Data structures and algorithms using Python

License

Notifications You must be signed in to change notification settings

VeldaKiara/Data_Structures_Algorithms_py

Repository files navigation

Data_Structures_Algorithms_py

Technologies

Python

Content

Stack

The stack data structure allows us to place any programming artifact, variable or object on it.
Its almost similar to a physical stack.

Stack Operations

Push

  • Used to insert elements to a stack
  • After pushing an element to a stack the new element becomes the top element.

Pop

  • Used to remove elements from a stack.
  • Uses First-in Last-out property, which means the top element , the last to be inserted is removed when the pop operation takes place.

NB: Pop and push are the most fundamental operations to be used in stacks.

Peek

  • Used to return the top element.
  • Helps to check whether the stack is empty or other things that may come up.

stack operation example

About

Documentation and my practice on Data structures and algorithms using Python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published