i have a binary tree.
and i need to build a function which gets the root and the level integer.
and it needs to return how many nodes are from the given level till the final level
(the leaves level)
each node has left ,right ,int value
This is a discussion on looking for algoritm for this problem.. within the C Programming forums, part of the General Programming Boards category; i have a binary tree. and i need to build a function which gets the root and the level integer. ...
i have a binary tree.
and i need to build a function which gets the root and the level integer.
and it needs to return how many nodes are from the given level till the final level
(the leaves level)
each node has left ,right ,int value
How many times do you have to be told? These are the basic guidelines for the forum - you've seen this hundreds, possibly thousands of times.
1) Make an attempt. If you don't know where to start, try searching.
2) Binary trees have been discussed countless times on this forum - you have no excuse for not even finding a place to start
3) Once you've made an attempt, and you have a specific problem that cannot be resolved by looking in the documentation, post the details: error messages, problems, and just as important: what you have done to solve the problem.
i dont want that you will write me the code
i want the basic idea