Given a Binary Tree, we will develop an algorithm to check if it has duplicate values. This can be done in linear time O(N) where there are N elements in the Binary Tree.
First things first,What is a Binary tree exactly?
A binary tree is a tree-type non-linear data structure.Each node of a binary tree has maximum of two children and minimum of zero children. The node at the top of the hierarchy of a tree is called the root node.Each node has at most two children which are referred to as the righ...
Published on February 15, 2021 03:01