## Introduction to Data Structures | 10 most commonly used Data Structures

A data structure is a particular way of organizing data in a computer so that it can be used effectively. The idea is to reduce… Read More »

- Sliding Window Maximum (Maximum of all subarrays of size k) using stack in O(n) time
- Print the last k nodes of the linked list in reverse order | Recursive approach
- Program to reverse a linked list using Stack
- Difference between Stack and Queue Data Structures
- Print the last k nodes of the linked list in reverse order | Iterative Approaches
- Print Stack Elements from Bottom to Top
- Iterative Postorder traversal | Set 3
- Find maximum in stack in O(1) without using additional stack
- Sum of maximum elements of all possible sub-arrays of an array
- Sum of bitwise AND of all submatrices
- Sum of minimum elements of all possible sub-arrays of an array
- Sum of Bitwise-OR of all Submatrices
- Check if the two given stacks are same
- Number of submatrices with OR value 1
- Number of submatrices with all 1s
- Print leaf nodes in binary tree from left to right using one stack
- Delete all even elements from a stack
- Design a stack which can give maximum frequency element
- Reverse the Sentence using Stack
- Implementing Forward Iterator in BST
- Analyzing BufferOverflow with GDB
- Introduction to Data Structures | 10 most commonly used Data Structures
- Nodes from given two BSTs with sum equal to X
- Triplet with a given sum in BST | Set 2

A data structure is a particular way of organizing data in a computer so that it can be used effectively. The idea is to reduce… Read More »

Given a Binary search tree, the task is to implement forward iterator on it with the following functions. curr(): returns the pointer to current element.… Read More »

Given two Binary search trees and an integer X, the task is to find a pair of nodes, one belonging to the first BST and… Read More »

Given a binary search tree, and an integer X, the task is to find if there exists a triplet with sum X. Print Yes or… Read More »

Given N elements and the task is to implement a stack which removes and returns the maximum frequency element on every pop operation. If there’s… Read More »

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 »