We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
If the parent node corresponding to a node is 'NULL' -> It is the root node.
Else if the node is a part of the parent as well as the node columns, it means that the node has a child as well as a parent. So -> this is an inner node.
Else all other nodes will be the leaf nodes because they have a parent node but no child nodes.
Binary Tree Nodes
You are viewing a single comment's thread. Return to all comments →
MySQL Solution
Logic:
Code: