tarverse binary tree
-
I have binary tree And I want to traverse this tree level by level that's mean print the level zero then level one ....etc how can I do that
where you get the binary tree from? as far as i know there is not one included in .Net framework (or whatever your using)(I may be wrong). But basically you would need to know how it works before you can move through it. If you made your own then you should know this answer.
-
I have binary tree And I want to traverse this tree level by level that's mean print the level zero then level one ....etc how can I do that
Use a breadth-first search: http://en.wikipedia.org/wiki/Breadth-first_search[^]
-
where you get the binary tree from? as far as i know there is not one included in .Net framework (or whatever your using)(I may be wrong). But basically you would need to know how it works before you can move through it. If you made your own then you should know this answer.
-
thanks so much I am study data structure specially non linear data structure and I need algorithm to solve my problem I know about BFS but I think this used in graph only my be my teacher Will Not accept this BFS in binary tree thanks another time
A binary tree IS a graph. You can use a BFS quite easily on a binary tree.
-
I have binary tree And I want to traverse this tree level by level that's mean print the level zero then level one ....etc how can I do that
You need to find out about 'recursion' techniques