There are two types of skewed binary trees: Left and Right skewed binary trees. From their characteristics we can conclude that they either have one child node or no node at all.
Hence, below given binary tree is skewed.

and below binary tree is not skewed since one of its nodes have two child nodes.

Hence, in its implementation we will recursively check if the nodes of the binary tree have one child nodes or no node. If so, then we will keep traversing else return false on encountering two ch...
Published on March 26, 2021 09:29