## Reverse the Sentence using Stack

Given a string str consisting of a sentence, the task is to reverse the entire sentence word by word. Examples: Input: str = “geeks for… Read More »

- Introduction to Data Structures | 10 most commonly used Data Structures
- InfyTQ 2019 : Find the position from where the parenthesis is not balanced
- Check if the two given stacks are same
- Design a stack which can give maximum frequency element
- Implementing Forward Iterator in BST
- Reverse the Sentence using Stack
- Analyzing BufferOverflow with GDB
- Python | Stack using Doubly Linked List
- Find all unique pairs of maximum and second maximum elements over all sub-arrays in O(NlogN)
- Triplet with a given sum in BST | Set 2
- Nodes from given two BSTs with sum equal to X
- Convert ternary expression to Binary Tree using Stack
- Stack in Python
- Find the winner of the Game to Win by erasing any two consecutive similar alphabets

Given a string str consisting of a sentence, the task is to reverse the entire sentence word by word. Examples: Input: str = “geeks for… Read More »

Pre-requisite: GDB (Step by Step Introduction) A BufferOverflow often occurs when the content inside the defined variable is copied to another variable without doing Bound… Read More »

Given two Stacks, the task is to check if the given stacks are same or not. Two stacks are said to be same if they… Read More »

Given a stack with n elements, the task is to remove all the elements of the stack without affecting the order of elements. Examples: Input… Read More »

We have seen different ways of performing postorder traversal on Binary Trees. Post Order Traversal. Iterative Postorder Traversal using Two Stacks. Iterative Postorder Traversal using… Read More »

Give an array arr[] of N integers and another integer k ≤ N. The task is to find the maximum element of every sub-array of… Read More »

The task is to design a stack which can get the maximum value in the stack in O(1) time without using an additional stack. Examples:… Read More »

Given a binary tree, the task is to print all leaf nodes of the given binary tree from left to right. That is, the nodes… Read More »

Given a linked list containing N nodes and a positive integer K where K should be less than or equal to N. The task is… Read More »

Given a NxN matrix, the task is to find the sum of bit-wise OR of all of its rectangular sub-matrices. Examples: Input : arr[][] =… Read More »

Given a NxN matrix, the task is to find the sum of bit-wise AND of all of its rectangular sub-matrices. Examples: Input : arr[][] =… Read More »

Given a N*N binary matrix, task is to find the count of rectangular sub-matrices with OR value 1. Examples: Input : arr[][] = {{0, 0,… Read More »

Given a N*N matrix containing only 0s and 1s, the task is to count the number of submatrices containing all 1s. Examples: Input : arr[][]… Read More »

Given a stack s, the task is to print the elements of the stack from bottom to top, such that the elements are still present… Read More »

Given a linked list. The task is to reverse the order of the elements of the Linked List using an auxiliary Stack. Examples: Input :… Read More »