Skip to content

Is there any differences between a stack and an array? and if so, what are they? I feel like they're similar, but different #1661

Answered by Emojees
Kuefo asked this question in Q&A
Discussion options

You must be logged in to vote

Stack follows a Last In First Out (LIFO) pattern. What this means is that data access necessarily follows a particular sequence where the last data to be stored is the first one that will be extracted.

On the other hand, arrays do not follow a specific order but can instead be accessed or called by referring to the indexed element within the array.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Kuefo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants