Courses
Tutorials
Practice
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
DSA
22.8K+ articles
Misc
8.8K+ articles
Arrays
6.5K+ articles
Tree
1.4K+ articles
Matrix
1.3K+ articles
Linked List
1.2K+ articles
Recursion
1.0K+ articles
Binary Tree
330+ articles
Binary Search Tree
291+ articles
Traversal
81 posts
Recent Articles
Popular Articles
Maximum strength in a Matrix after performing specified operations
Last Updated: 22 February 2023
Given a matrix of N * M containing {0, 1, #}. The task is to find the maximum value of strength based on following rules:Initial strength is zero.If you encounter a 0, Str...
read more
Matrix
School Programming
Write From Home
DSA
Traversal
Common operations on various Data Structures
Last Updated: 27 March 2023
Data Structure is the way of storing data in computer's memory so that it can be used easily and efficiently. There are different data-structures used for the storage of d...
read more
Strings
Linked List
Tree
Graph
Stack
Queue
Searching
Sorting
Heap
Hash
Matrix
Binary Search Tree
Data Structures
DSA
Arrays
Data Structures
Traversal
Replace every node of a Linked list with the next greater element on right side
Last Updated: 15 September 2022
Given a linked list, the task is to find the Next Greater Element for every node of the linked list.Note: For nodes with no next greater element, store -1 in the result.Ex...
read more
Linked List
DSA
Traversal
How to Iterate Through a Vector Without Using Iterators in C++?
Last Updated: 19 November 2024
In this article, we will learn how to iterate through the vector without using iterator in C++.The most efficient method to iterate through the vector without using iterat...
read more
Competitive Programming
C++ Programs
C++
DSA
cpp-iterator
STL
CPP-Library
cpp-vector
cpp-containers-library
cpp-map
Traversal
CPP Examples
Arrange numbers 1 to N^2 in a Zig-Zag Matrix in ascending order
Last Updated: 19 April 2021
Given a positive integer N, the task is to print an N × N zig-zag matrix consisting of numbers from 1 to N2, such that the ZigZag traversal of the matrix yields the number...
read more
Mathematical
Matrix
School Programming
DSA
pattern-printing
Traversal
Minimum steps to convert all paths in matrix from top left to bottom right as palindromic paths | Set 2
Last Updated: 08 May 2023
Given a matrix mat[][] with N rows and M columns. The task is to find the minimum number of changes required in the matrix such that every path from top left to bottom rig...
read more
Matrix
DSA
palindrome
frequency-counting
Traversal
Minimum steps to convert all paths in matrix from top left to bottom right as palindromic paths
Last Updated: 24 March 2023
Given a matrix mat[][] with N rows and M columns. The task is to find the minimum number of changes required in the matrix such that every path from top left to bottom rig...
read more
Greedy
Matrix
CS – Placements
DSA
palindrome
Traversal
Min number of moves to traverse entire Matrix through connected cells with equal values
Last Updated: 27 May 2021
Given a matrix A[][] of dimension N*M, the task is to find the minimum number of moves required to traverse the entire matrix starting from (0, 0) by traversing connected ...
read more
Searching
Matrix
Competitive Programming
DSA
cpp-set
Traversal
Level order traversal in spiral form using stack and multimap
Last Updated: 26 April 2023
Given a binary tree of N nodes, the task is to print level order traversal in a spiral form. In spiral form, nodes at the first and second level of tree are printed normal...
read more
Strings
Tree
Stack
Algorithms
Competitive Programming
Recursion
DSA
spiral
cpp-stack
cpp-multimap
Traversal
Check if the Binary Tree contains a balanced BST of size K
Last Updated: 23 August 2021
Given a Binary Tree and a positive integer K. The task is to check whether the Balanced BST of size K exists in a given Binary Tree or not. If it exists then print “Yes” e...
read more
Tree
Searching
Binary Search Tree
Recursion
DSA
PostOrder Traversal
Binary Tree
tree-traversal
Tree Traversals
Binary Search Trees
Traversal
Minimum steps to convert all top left to bottom right paths in Matrix as palindrome | Set 2
Last Updated: 24 March 2023
Given a matrix mat[][] with N rows and M columns. The task is to find the minimum number of changes required in the matrix such that every path from top left to bottom rig...
read more
Dynamic Programming
Greedy
Matrix
DSA
palindrome
Algorithms-Dynamic Programming
Traversal
Find maximum GCD value from root to leaf in a Binary tree
Last Updated: 23 August 2021
Given a Binary Tree, the task is to find the maximum value of GCD from any path from the root node to the leaf node.Examples:Input: Below is the given tree:Output: 3Explan...
read more
Tree
Greedy
Recursion
DSA
Preorder Traversal
Binary Tree
tree-traversal
GCD-LCM
Data Structures
Data Structures-Tree Traversals
Tree Traversals
Traversal
Matrix Spiral Traversal starting from given Coordinates
Last Updated: 31 March 2022
Given the order of the matrix N and M, and a source location (X, Y), the task is to find all the coordinates of the matrix in order when visited in clockwise spiral order(...
read more
Pattern Searching
Matrix
DSA
Traversal
Restoring BST Structure from Leaf Removal Sequences
Last Updated: 10 June 2024
Given a sequence of strings representing the leaf nodes removed from a Binary Search Tree (BST) in multiple iterations, reconstruct the original BST and print its pre-orde...
read more
Binary Search Tree
DSA
Traversal
Traversal in Array
Last Updated: 19 February 2025
Traversal in an array refers to the process of accessing each element in the array sequentially, typically to perform a specific operation, such as searching, sorting, or ...
read more
DSA
Arrays
Traversal
1
2
3
4
5
6
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !