Skip to content

Created an Introduction to Stacks#69

Open
JacobGa03 wants to merge 9 commits intomainfrom
Stacks
Open

Created an Introduction to Stacks#69
JacobGa03 wants to merge 9 commits intomainfrom
Stacks

Conversation

@JacobGa03
Copy link
Contributor

Created a short tutorial on stacks.

Created a tutorial meant to describe the basics of stacks.
Copy link
Contributor

@panbed panbed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very preliminary review, I'm still at work so I can't really deep dive into the content yet but this review is just to address a few small issues and maybe some new content that could be added.


# What is a Stack?

According to Don Knuth, a stack is "a linear list for which all insertions and deletions are made at one end of the list." The quote illustrates the `Last in First Out` principle (LIFO) which all stacks follow. The last item placed in the stack will be the first item to be removed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a "real world" example of a stack might be helpful? For instance I've always liked the analogy to a "stack" of paper, e.g. "pushing" to a stack is like adding another paper to your "stack" of paper, "popping" is removing it from the top, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good idea. Wasn't sure which example to use, but paper or plates should work.

JacobGa03 and others added 6 commits August 6, 2024 14:23
Co-authored-by: Bed Pandey <bed.dev.p@gmail.com>
Co-authored-by: Bed Pandey <bed.dev.p@gmail.com>
Co-authored-by: Bed Pandey <bed.dev.p@gmail.com>
Co-authored-by: Bed Pandey <bed.dev.p@gmail.com>
Co-authored-by: Bed Pandey <bed.dev.p@gmail.com>
Co-authored-by: Bed Pandey <bed.dev.p@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: 📝 In review

Development

Successfully merging this pull request may close these issues.

2 participants