Get free ebooK with 50 must do coding Question for Product Based Companies solved
Fill the details & get ebook over email
Thank You!
We have sent the Ebook on 50 Must Do Coding Questions for Product Based Companies Solved over your email. All the best!

## Representation of Stack using Array

Stack is a linear data structure that executes all operations according to the LIFO (Last In First Out) principle. Only one end of the stack, starting from the top, is...

## Reverse A Stack Using Recursion

In this tutorial, we will delve into a well-known problem in data structures: "Reversing a Stack Using Recursion." If you have a good understanding of both stacks and recursion, tackling...

## Stack Implementation using Linked List

In this article, we will learn about what is stack and about various operations performed on Stack in Data Structure, stack implementation using linked list with the dry run of...

## Applications of Stack in Data Structure

In this tutorial, we will be explaining the Application of stack in data structures. The Stack is a major topic that belongs to the realm of computer science. Additionally, you...

## Implementation Of Stack using Array

In this article, we will learn what is a stack, the algorithm for the implementation of stack using array, the algorithm of the stack with an example dry-run, the program...

## Difference between Stack and Heap

In this article, we will learn what is memory allocation, what is stack and heap memory, and how stack memory works with an example of a program in c language,...

## How to Implement Min Stack

In this article, we will learn what is Min Stack and what are the different ways to implement the min stack. What is Min Stack? The Min Stack is a...

## What is Stack in Data Structure

This article aims to comprehensively explore the fundamental aspects of the stack data structure. We'll begin by delving into the basics of stacks, including their definition and significance within data...

## Stack Operations in Data Structure

In the realm of computer science and data structures, understanding the fundamentals of various data storage and manipulation techniques is crucial. One such foundational structure is the stack – a...

## Stack Pointer: Types, Applications, and Operations

The stack pointer, a fundamental concept in computer science and programming, plays a pivotal role in managing memory and controlling program execution. As a core component of the stack data...

## Identify and mark unmatched parenthesis in an expression

Given an expression, find and mark matched and unmatched parenthesis in it. We need to replace all balanced opening parenthesis with 0, balanced closing parenthesis with 1, and all unbalanced...

## Expression contains redundant bracket or not

Note: Expression may contain any of these ‘+‘, ‘*‘, ‘–‘, and ‘/‘ operators. Given expression is valid and there are no white spaces present. Examples: Input: “((a+b+c))” Output: YES Explanation:...

## Reversing the First K Elements of a Queue

Problem Statement: You are given a queue of integers and an integer value K. Your task is to reverse the first K elements of the queue, leaving the rest of...

## Reverse a Number using Stack

A stack is a type of linear data structure that follows a specific order for performing operations. The sequence can either be Last In First Out (LIFO) or First In...

## Tracking the Current Maximum Element in the Stack

Problem Statement: You will be given a stack of integer values. You have to keep a track of the maximum value in the stack. For instance, the element that is...

## Stack Permutations (Check if an Array is Stack Permutation of Another)

Problem Statement: You will be given 2 arrays. You have to tell whether the 2 arrays are stack permutations of each other or not. Basically, there will be 2 input...

## Find Maximum Sum Possible Equal Sum of Three Stacks

Problem Statement You are given three stacks, you need to find the maximum sum possible of the three stacks. You are only allowed to remove the top of the stack....

## Reverse a String using a Stack

Problem Statement You are given a string, and your task is to reverse the string using a stack data structure. Input: String. Output: Reversed string. Test cases: Input: “Prepbytes” Output:...

## How to Sort a Stack using Recursion

First we’ll discuss what is Stack: Stack follows the principle of LIFO (Last in First out) i.e. element which is inserted at last will be removed first. The operation for...

## Iterative Postorder Traversal | Set 1 (Using Two Stacks)

Problem Statement You are given a binary tree. Your task is to print the postorder traversal of the tree iteratively, using 2 stacks. Example Consider the tree given below. The...

## Delete Middle Element of the Stack

In computer science, a stack is an abstract data type that represents a collection of elements, where the addition or removal of elements follows a Last-In-First-Out (LIFO) order. That is,...

## Sort an array using stacks

Problem statement Given an array of integers of size N , sort it in increasing order using a stack. Example : Sample input : 4 2 3 1 5 Sample...

## Check If A Queue Can Be Sorted Into Another Queue Using A Stack

Problem statement Given a queue having N numbers . Numbers in the queue is a permutation of first N natural numbers (1 to N) . You have to find out...

## Expression Evaluation

Problem Statement You will be given a string representing a mathematical expression. You have to evaluate it and return the result. Some Constraints The input string will be in Infix...

## Conversion Infix notation to Prefix notation

The conversion from infix notation to prefix notation involves reversing the order of the expression, replacing each operator with its corresponding prefix operator, and swapping the positions of each operand....

## Conversion of Postfix expression to Infix expression

Problem statement Given an arithmetic expression in postfix notation , convert it into the equivalent infix notation. Sample example : Postfix Input : abc/-ad/e-* Infix output : ((a-(b/c))*((a/d)-e)) Postfix input...

## Postfix to Prefix Conversion

Problem statement Given an arithmetic expression in postfix notation , convert it into the equivalent prefix notation. Sample example : Postfix input: abc/-ad/e-* Prefix output: *-a/bc-/ade Postfix input : ab*...

## Conversion of Prefix to Postfix notation

We have been given an arithmetic expression, and we have to write a program that converts prefix to postfix. The expression is given in the form of a string that...

## Conversion of Prefix expression to Infix expression

Conversion of prefix expression to infix expression involves rearranging the operators and operands to follow the rules of infix notation while maintaining the order of operations. This can be achieved...

## Infix to Postfix Conversion using Stack

We have given an Arithmetic Expression and we have to write a program that converts the infix to postfix using stack in C. The Expression will be given in the...