i've referred a couple of datastructure books and both give different definitions for width of a binary tree.
one says its the no of nodes at a level,while another says its the longest path that can be traversed in a binary tree.
can any one help me with a recursive /non recursive algorithm for the second one?
cuperman
0
Newbie Poster
Recommended Answers
Jump to PostGenerally, a binary tree is a collection of nodes, each with one 'parent' and two 'children', a 'left' child and a 'right' child. In addition, there would be some data or payload.
But from there, folks specialize them in all kinds of ways. For example, 'red/black' trees; search Google …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.