Tutorials
Courses
Go Premium
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
32.1K+ articles
DSA
20.0K+ articles
Misc
7.8K+ articles
Arrays
4.2K+ articles
Tree
909+ articles
Matrix
743+ articles
Linked List
666+ articles
Recursion
591+ articles
Binary Tree
330+ articles
Binary Search Tree
166+ articles
Traversal
81 posts
Recent Articles
Popular Articles
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
Restoring BST Structure from Leaf Removal Sequences
Last Updated: 23 July 2025
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
Matrix Spiral Traversal starting from given Coordinates
Last Updated: 23 July 2025
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
Find maximum GCD value from root to leaf in a Binary tree
Last Updated: 15 July 2025
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
Minimum steps to convert all top left to bottom right paths in Matrix as palindrome | Set 2
Last Updated: 15 July 2025
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
Check if the Binary Tree contains a balanced BST of size K
Last Updated: 15 July 2025
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
Level order traversal in spiral form using stack and multimap
Last Updated: 15 July 2025
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
DSA
spiral
cpp-stack
cpp-multimap
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
DSA
cpp-set
Traversal
Minimum steps to convert all paths in matrix from top left to bottom right as palindromic paths | Set 2
Last Updated: 15 July 2025
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: 15 July 2025
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
Replace every node of a Linked list with the next greater element on right side
Last Updated: 12 July 2025
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
Arrange numbers 1 to N^2 in a Zig-Zag Matrix in ascending order
Last Updated: 15 July 2025
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
DSA
pattern-printing
Traversal
How to Iterate Through a Vector Without Using Iterators in C++?
Last Updated: 15 July 2025
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
C++
cpp-iterator
STL
CPP-Library
cpp-vector
cpp-containers-library
cpp-map
Traversal
CPP Examples
Common operations on various Data Structures
Last Updated: 28 July 2025
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
DSA
Data Structures
Traversal
Maximum strength in a Matrix after performing specified operations
Last Updated: 12 July 2025
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
DSA
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 !