Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
nithish642k
binary-tree
Repository navigation
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
More
items
binary-tree
Public
Notifications
You must be signed in to change notification settings
Fork
0
(
0
)
Star
0
(
0
)
You must be signed in to star a repository
About
Binary tree data structure-problems
Activity
Stars
0
stars
Watchers
1
watching
Forks
0
forks
Report repository
master
Branches
Tags
Go to file
Code
Open more actions menu
Latest commit
History
2 Commits
2 Commits
Folders and files
Name
Name
Last commit message
Last commit date
.gitattributes
.gitattributes
1)inorder preorder postorder.cpp
1)inorder preorder postorder.cpp
10)reverse level order traversal using recursion.cpp
10)reverse level order traversal using recursion.cpp
11)reverse level order traversal using queue.cpp
11)reverse level order traversal using queue.cpp
12)left view.cpp
12)left view.cpp
13)left view(gfg solution).cpp
13)left view(gfg solution).cpp
14)right view(gfg solution).cpp
14)right view(gfg solution).cpp
14)right view.cpp
14)right view.cpp
15)inorder preorder postorder without recursion.cpp
15)inorder preorder postorder without recursion.cpp
16)convert a tree to its mirror.cpp
16)convert a tree to its mirror.cpp
17)delete the binary tree.cpp
17)delete the binary tree.cpp
18)check if two binary trees are identical.cpp
18)check if two binary trees are identical.cpp
19)get level of a node.cpp
19)get level of a node.cpp
2)sum of all nodes.cpp
2)sum of all nodes.cpp
20)top view.cpp
20)top view.cpp
21)bottom view.cpp
21)bottom view.cpp
22)print boundary nodes anticlockwise.cpp
22)print boundary nodes anticlockwise.cpp
23)vertical order traversal.cpp
23)vertical order traversal.cpp
24)vertical sum.cpp
24)vertical sum.cpp
25)level wise sum.cpp
25)level wise sum.cpp
26)search an element in a tree.cpp
26)search an element in a tree.cpp
27)spiral traversal of binary tree.cpp
27)spiral traversal of binary tree.cpp
28)spiral traversal(using stacks).cpp
28)spiral traversal(using stacks).cpp
29)print nodes between given levels O(n).cpp
29)print nodes between given levels O(n).cpp
3)difference between odd and even level nodes.cpp
3)difference between odd and even level nodes.cpp
30)maximum width of a binary tree.cpp
30)maximum width of a binary tree.cpp
31)check if two trees are mirror to each other.cpp
31)check if two trees are mirror to each other.cpp
32)check if two trees are mirror structure to each other.cpp
32)check if two trees are mirror structure to each other.cpp
32)check if two trees have same structure.cpp
32)check if two trees have same structure.cpp
33)check if a tree is foldable.cpp
33)check if a tree is foldable.cpp
34)check if two trees are isomorphic.cpp
34)check if two trees are isomorphic.cpp
35)width of given level(number of nodes in given level).cpp
35)width of given level(number of nodes in given level).cpp
36)convert a tree to double tree.cpp
36)convert a tree to double tree.cpp
37)construct tree from inorder and preorder.cpp
37)construct tree from inorder and preorder.cpp
38)height of binary tree(iterative).cpp
38)height of binary tree(iterative).cpp
39)diameter of binary tree.cpp
39)diameter of binary tree.cpp
4)number of nodes.cpp
4)number of nodes.cpp
40)check if given tree is height balanced.cpp
40)check if given tree is height balanced.cpp
41)check if root to any leaf sum matches given sum.cpp
41)check if root to any leaf sum matches given sum.cpp
42)print all root to leaf paths.cpp
42)print all root to leaf paths.cpp
43)maximum sum from root to leaf.cpp
43)maximum sum from root to leaf.cpp
44)maximum sum from root to leaf O(n).cpp
44)maximum sum from root to leaf O(n).cpp
45)sum of numbers formed from root to leaf paths.cpp
45)sum of numbers formed from root to leaf paths.cpp
46)find max and min value node of binary tree.cpp
46)find max and min value node of binary tree.cpp
47)minimum height of binary tree.cpp
47)minimum height of binary tree.cpp
48)sum of all leaf nodes.cpp
48)sum of all leaf nodes.cpp
49)sum of all left leaves.cpp
49)sum of all left leaves.cpp
5)number of leaf nodes.cpp
5)number of leaf nodes.cpp
50)mimimum distance from root to leaf.cpp
50)mimimum distance from root to leaf.cpp
51)check if all leaf nodes are at same level.cpp
51)check if all leaf nodes are at same level.cpp
52)get the deepest left leaf node.cpp
52)get the deepest left leaf node.cpp
53)get the deepest odd level which contains leaf node.cpp
53)get the deepest odd level which contains leaf node.cpp
54)remove nodes on root to leaf paths of length less than k.cpp
54)remove nodes on root to leaf paths of length less than k.cpp
55)check if there is a root to leaf path with given sequence.cpp
55)check if there is a root to leaf path with given sequence.cpp
56)check if there is a root to leaf path with given string sequence.cpp
56)check if there is a root to leaf path with given string sequence.cpp
57)print ancestors of the node with given value.cpp
57)print ancestors of the node with given value.cpp
58)print the parent of given node(the easy way).cpp
58)print the parent of given node(the easy way).cpp
58)print the parent of given node.cpp
58)print the parent of given node.cpp
59)get the sibling of given node.cpp
59)get the sibling of given node.cpp
6)height of binary tree.cpp
6)height of binary tree.cpp
60)check if two nodes are siblings.cpp
60)check if two nodes are siblings.cpp
61)check if two nodes are cousins.cpp
61)check if two nodes are cousins.cpp
62)find LCA(the correct way).cpp
62)find LCA(the correct way).cpp
62)find lowest common ancestor(LCA) of given two nodes.cpp
62)find lowest common ancestor(LCA) of given two nodes.cpp
63)find distance between two nodes.cpp
63)find distance between two nodes.cpp
64)print nodes that are at k distance from given node.cpp
64)print nodes that are at k distance from given node.cpp
65)print nodes at k distance up from all leaves.cpp
65)print nodes at k distance up from all leaves.cpp
66)average of all nodes.cpp
66)average of all nodes.cpp
67)closest leaf node distance from given node.cpp
67)closest leaf node distance from given node.cpp
68)serialize and deserialize a binary tree.cpp
68)serialize and deserialize a binary tree.cpp
69)check if given binary tree is BST.cpp
69)check if given binary tree is BST.cpp
7)print nodes at given level.cpp
7)print nodes at given level.cpp
70)convert binary tree to doubly linked list.cpp
70)convert binary tree to doubly linked list.cpp
71)find node to the right of given value.cpp
71)find node to the right of given value.cpp
72)connect next pointer to level order successor.cpp
72)connect next pointer to level order successor.cpp
73)check if each parent contains sum of children.cpp
73)check if each parent contains sum of children.cpp
74)check if each node contains sum of left and right sub tree(sum tree).cpp
74)check if each node contains sum of left and right sub tree(sum tree).cpp
75)diagonal sums of binary tree.cpp
75)diagonal sums of binary tree.cpp
76)check if tree2 is a subtree of tree1.cpp
76)check if tree2 is a subtree of tree1.cpp
77)get maximum sum between any two leaves.cpp
77)get maximum sum between any two leaves.cpp
78)get maximum path sum.cpp
78)get maximum path sum.cpp
79)sum of leaf nodes at minimum level.cpp
79)sum of leaf nodes at minimum level.cpp
8)level order traversal using recursion.cpp
8)level order traversal using recursion.cpp
80)print all paths with sum equal to k.cpp
80)print all paths with sum equal to k.cpp
81)count of nodes with siblings.cpp
81)count of nodes with siblings.cpp
9)level order traversal using queue.cpp
9)level order traversal using queue.cpp
tree used.JPG
tree used.JPG
View all files
About
Binary tree data structure-problems
Activity
Stars
0
stars
Watchers
1
watching
Forks
0
forks
Report repository
Releases
Packages
Contributors
Languages
You can’t perform that action at this time.