General Tree — which is also called Generic, n-ary, m-ary, k-ary or k-way Tree is a non-linear, advanced, and powerful data structure that is widely used for storing hierarchically relational data. A node can have zero or any number of children, as well as there are no restrictions on how…