Trees are one of the key data structures in algorithms and appear in a wide range of problems.A tree is a connected, acyclic, undirected graph.A graph G=(V,E) is called a tree if it satisfies the following properties: