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
Mathematical
7.8K+ articles
Competitive Programming
3.3K+ articles
Data Structures
1.1K+ articles
Recursion
1.0K+ articles
Advanced Data Structure
595+ articles
DFS
359+ articles
Binary Tree
330+ articles
Trees
61 posts
Recent Articles
Popular Articles
Find MEX of every subtree in given Tree
Last Updated: 31 October 2023
Given a Generic Tree consisting of N nodes numbered from 0 to N - 1 which is rooted at node 0 and an array val[] such that the value at each node is represented by val[i],...
read more
Tree
Divide and Conquer
Searching
Sorting
DSA
Arrays
Trees
tree-traversal
Binary Search
DFS
Find path between lowest and highest value in a Binary tree
Last Updated: 31 October 2023
Given a binary tree consisting of N nodes. Find the path between the node having the lowest value to the node having the highest value. There is no restriction on the trav...
read more
Tree
DSA
Trees
tree-traversal
BFS
Step by step Shortest Path from source node to destination node in a Binary Tree
Last Updated: 27 March 2023
Given a root of binary tree and two integers startValue and destValue denoting the starting and ending node respectively. The task is to find the shortest path from the st...
read more
Tree
Backtracking
Competitive Programming
Recursion
DSA
Trees
Binary Tree
tree-traversal
LCA
Find Mode in Binary Search tree
Last Updated: 22 March 2023
Given a Binary Search Tree, find the mode of the tree.Note: Mode is the value of the node which has the highest frequency in the binary search tree.Examples:Input: ...
read more
Hash
Binary Search Tree
DSA
Trees
Count the unique type of nodes present in Binary tree
Last Updated: 30 November 2023
According to the property of a Binary tree, a node can have at most two children so there are three cases where a node can have two children, one child, or no child, the t...
read more
Tree
DSA
Trees
Binary Tree
Java-HashMap
Map
Maximal Point Path
Last Updated: 16 October 2023
Given a tree with N nodes numbered from 1 to N. Each Node has a value denoting the number of points you get when you visit that Node. Each edge has a length and as soon as...
read more
Tree
Dynamic Programming
DSA
Trees
Algorithms-Dynamic Programming
Exploring Range Trees
Last Updated: 13 September 2023
While learning data structures we come across various types of data structures ranging from data structures like arrays to slightly difficult data structures like graphs a...
read more
Tree
DSA
Trees
Data Structures
DP on Trees for Competitive Programming
Last Updated: 31 December 2023
Dynamic Programming (DP) on trees is a powerful algorithmic technique commonly used in competitive programming. It involves solving various tree-related problems by effici...
read more
Competitive Programming
DSA
Trees
Algorithms-Dynamic Programming
Binary Lifting Guide for Competitive Programming
Last Updated: 10 March 2024
Binary Lifting is a Dynamic Programming approach for trees where we precompute some ancestors of every node. It is used to answer a large number of queries where in each q...
read more
Competitive Programming
DSA
Trees
LCA
Maximum prizes in a tree by placing M persons
Last Updated: 18 January 2024
Given n nodes with exactly n-1 edges and m persons (n =m). At each node, you can either place a person or unlimited prizes for persons. Each person would be moving towards...
read more
Graph
Geeks Premier League
DSA
Trees
DFS
Geeks Premier League 2023
Collect Maximum Points from all Nodes
Last Updated: 09 January 2024
Given a tree of N nodes and N-1 edges rooted at Node 1, an array points[] of size N, where points[i] denote the number of points at the vertex i and an integer k. A Node c...
read more
Dynamic Programming
Competitive Programming
DSA
Trees
Algorithms-Dynamic Programming
Count Edge reversal in a Directed Graph
Last Updated: 31 December 2023
Given a directed graph with n nodes from 0 to n-1, a 2d array edges[][] where edges[i] = [ui, vi] represents a directed edge going from node ui to node vi . The graph woul...
read more
Graph
Geeks Premier League
DSA
Trees
Geeks Premier League 2023
POTD Solutions | 17 Nov' 23 | Binary Tree to CDLL
Last Updated: 22 November 2023
View all POTD SolutionsWelcome to the daily solutions of our PROBLEM OF THE DAY (POTD). We will discuss the entire problem step-by-step and work towards developing an opti...
read more
Competitive Programming
DSA
Linked Lists
Trees
GFG-POTD-Solutions
Find Edge Weights in a Spanning Tree with Edge (u, v)
Last Updated: 16 February 2024
Given an undirected weighted graph with N nodes and M edges, the task is for each edge (u, v) find the minimum possible weight of the Spanning Tree which contains the edge...
read more
Graph
Competitive Programming
Picked
Geeks Premier League
DSA
Trees
Kruskal'sAlgorithm
DFS
LCA
Geeks Premier League 2023
Preorder vs Inorder vs Postorder
Last Updated: 17 April 2024
InPreorder Traversal, the root node is visited first, followed by the left and right subtrees.Inorder Traversalstarts with the left subtree, visits the root, and then the ...
read more
Tree
DSA
Trees
Inorder Traversal
Preorder Traversal
PostOrder Traversal
1
2
3
4
5
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 !