Tagged: stacks

Next Greater Element

“Next Greater Element” is a classic interview problem based on stack data structure. Here, we have given an array with ‘n’ elements. Our task is to print next greater element of each element of an array. If there is no greater element for any element in an array, simply print...

Check for balanced parentheses

“Check for balanced parentheses” is one of an ideal application of stack data structure. Here, we have given a parentheses string and our aim is to check whether the given string is balanced parentheses string or not.  Balanced parentheses strings are those strings who have closing parentheses like }, ], ) for each...

blank

Postfix to Prefix Conversion

“Postfix to Prefix Conversion” is a classic example of  stack data structure. Stack can be used to convert given postfix expression to corresponding prefix expression. Operator: Operator are symbols that instruct the computer to perform simple and single tasks. Examples of operators includes + (Addition), – (Subtraction), * (multiplication),… and many...

blank

Postfix to Infix Conversion

“Postfix to Infix conversion” is a classic example of  stack data structure. Stack can be used to convert given postfix expression to corresponding infix expression. Operator: Operator are symbols that instruct the computer to perform simple and single tasks. Examples of operators includes + (Addition), – (Subtraction), * (multiplication),… and many...

blank

Prefix to Postfix Conversion

“Prefix to postfix conversion” is a classic example of  stack data structure. Stack can be used to convert given prefix expression to corresponding postfix expression. Operator: Operator are symbols that instruct the computer to perform simple and single tasks. Examples of operators includes + (Addition), – (Subtraction), * (multiplication),… and many...

blank

Prefix to Infix Using Stack

“Prefix to Infix Using Stack” is a classic example of  stack data structure. Stack can be used to convert given prefix expression to corresponding infix expression. Operator: Operator are symbols that instruct the computer to perform simple and single tasks. Examples of operators includes + (Addition), – (Subtraction), * (multiplication),… and...

blank

Infix to Postfix Conversion

“Infix to postfix conversion” is a classic example of  stack data structure. Stack can be used to convert given infix expression to corresponding postfix expression. Operator: Operator are symbols that instruct the computer to perform simple and single tasks. Examples of operators includes + (Addition), – (Subtraction), * (multiplication),… and many...

blank

Infix to Prefix Conversion

“Infix to prefix conversion” is a classic example of  stack data structure. Stack can be used to convert given infix expression to corresponding prefix expression. Operator: Operator are symbols that instruct the computer to perform simple and single tasks. Examples of operators includes + (Addition), – (Subtraction), * (multiplication),… and many...