Stack from Linear Data Structure ( #shorts )

1 year ago
3

Hi Friends,

Stack from Linear Data Structure.

Linear Data Structure : Stack Data Structure

In stack data structure, elements are stored in the LIFO principle as last-in, first-out. The last element added to the stack is the first one to be removed. Imagine you have a stack of plates in your kitchen. When you add a new plate, you place it on top of the stack. Similarly, when you remove a plate, you take it from the top of the stack.

A stack data structure works in a similar way. It's a collection of elements (like numbers or words) where you can only add or remove elements from one end, called the top. When you add an element, it goes on top of the stack, and when you remove an element, you take it from the top.

Stacks are commonly used in computer programming. For example, when you run a program, the computer uses a stack to keep track of where it is in the code. When it calls a function, it adds the function to the top of the stack. When the function is finished, it removes it from the top of the stack and goes back to where it was in the code.

#data #datastructure #datastructures #datastructureandalgorithm #stack #stackdatastructure #linear #lineardatastructure #linearstackdatastructure #developer #development #structure #algorithm #sjortsvideo #shortsfeed #shortfeed #shorts #short #shortvideo #shortsyoutube #shortsviral #shortvideos #viral #viral_video #viralshort #viralvideo #viralshorts #viralvideos #trending #trendingnow #trendingshort #trendingshorts #trend #trendingvideo #trends #success #motivation #programming #program #programmer #code #coders #coders #devlife #development #javascript #php #script #jquery #ec6 #ecmascript6 #ecmascript #interview #princecheema_official @princecheema_official

Loading comments...