Evaluating Prefix, Infix, and Postfix Expressions Using Stack

Applications of Stack in Data Structure (Part III)

Sushmita Singh
Code  Writers

--

Photo by Kelly Sikkema on Unsplash

Stack is a linear data structure that follows either LIFO (Last In First Out) or FILO (First In Last Out) principle. This means that the last element that is inserted is the first element to be removed.

Also, in the stack, the insertion and removal of an existing element take place at the same end, represented as the top of the stack.

Stacks can be implemented using either an array or a linked list. If you want dynamic memory allocation to choose the linked list, otherwise go for the array.

The stack data structures are simple to implement and easy to understand. They are also easy to maintain, and any modifications to the data structure can be easily made without affecting other elements in the stack.

Stacks are a fundamental data structure used in various applications in computer science and software development. Here are some common applications of stacks:

Table of Content

· Applications of Stack
· Common Notations of Arithmetic Expression
#1. Infix Notation
#2. Prefix Notation
#3. Postfix Notation
· Precedence and Associativity Order
· Evaluating Expressions
#1. Infix

--

--

Sushmita Singh
Code  Writers

Writer || Coder || Book Lover. Helping you evolve into the ultimate version of yourself. https://sushmitasingh.carrd.co/