473,385 Members | 2,015 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Binary tree code- help

Hi,
I am very new to C#.net. Right now i want to develope a binary tree for my
current project, The sp returns ParentID, SiblingID, Position(1/0 : 1-left,
0-right) and level (0 for root). From these i need to create a binary tree.

for eg :
1
2 3
4 5 6

The sp returns
1 2 1 0
1 3 0 0

2 4 1 1
2 5 0 1

3 6 1 0
Thanking in advance
Lara

Nov 19 '05 #1
5 1644
You're very welcome (Golly, that was easy!).

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Everybody picks their nose,
But some people are better at hiding it.

"Lara" <la**@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
Hi,
I am very new to C#.net. Right now i want to develope a binary tree for my
current project, The sp returns ParentID, SiblingID, Position(1/0 :
1-left,
0-right) and level (0 for root). From these i need to create a binary
tree.

for eg :
1
2 3
4 5 6

The sp returns
1 2 1 0
1 3 0 0

2 4 1 1
2 5 0 1

3 6 1 0
Thanking in advance
Lara

Nov 19 '05 #2
there is nothing in your message

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:#x**************@TK2MSFTNGP10.phx.gbl...
You're very welcome (Golly, that was easy!).

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
Everybody picks their nose,
But some people are better at hiding it.

"Lara" <la**@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
Hi,
I am very new to C#.net. Right now i want to develope a binary tree for my current project, The sp returns ParentID, SiblingID, Position(1/0 :
1-left,
0-right) and level (0 for root). From these i need to create a binary
tree.

for eg :
1
2 3
4 5 6

The sp returns
1 2 1 0
1 3 0 0

2 4 1 1
2 5 0 1

3 6 1 0
Thanking in advance
Lara


Nov 19 '05 #3
why don't u try using xml....form xml doc....and then do whatever u want with
this..
"Kevin Spencer" wrote:
You're very welcome (Golly, that was easy!).

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Everybody picks their nose,
But some people are better at hiding it.

"Lara" <la**@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
Hi,
I am very new to C#.net. Right now i want to develope a binary tree for my
current project, The sp returns ParentID, SiblingID, Position(1/0 :
1-left,
0-right) and level (0 for root). From these i need to create a binary
tree.

for eg :
1
2 3
4 5 6

The sp returns
1 2 1 0
1 3 0 0

2 4 1 1
2 5 0 1

3 6 1 0
Thanking in advance
Lara


Nov 19 '05 #4
i wnanna display the data as a binary tree

"HARI PRASD BARU" <HA***********@discussions.microsoft.com> wrote in message
news:AD**********************************@microsof t.com...
why don't u try using xml....form xml doc....and then do whatever u want with this..
"Kevin Spencer" wrote:
You're very welcome (Golly, that was easy!).

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Everybody picks their nose,
But some people are better at hiding it.

"Lara" <la**@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
Hi,
I am very new to C#.net. Right now i want to develope a binary tree for my current project, The sp returns ParentID, SiblingID, Position(1/0 :
1-left,
0-right) and level (0 for root). From these i need to create a binary
tree.

for eg :
1
2 3
4 5 6

The sp returns
1 2 1 0
1 3 0 0

2 4 1 1
2 5 0 1

3 6 1 0
Thanking in advance
Lara


Nov 19 '05 #5
See the following KB article:

http://support.microsoft.com/default...b;en-us;555375

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Everybody picks their nose,
But some people are better at hiding it.

"Lara" <la**@hotmail.com> wrote in message
news:Od**************@TK2MSFTNGP15.phx.gbl...
i wnanna display the data as a binary tree

"HARI PRASD BARU" <HA***********@discussions.microsoft.com> wrote in
message
news:AD**********************************@microsof t.com...
why don't u try using xml....form xml doc....and then do whatever u want

with
this..
"Kevin Spencer" wrote:
> You're very welcome (Golly, that was easy!).
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> ..Net Developer
> Everybody picks their nose,
> But some people are better at hiding it.
>
> "Lara" <la**@hotmail.com> wrote in message
> news:%2***************@TK2MSFTNGP09.phx.gbl...
> > Hi,
> > I am very new to C#.net. Right now i want to develope a binary tree for my > > current project, The sp returns ParentID, SiblingID, Position(1/0 :
> > 1-left,
> > 0-right) and level (0 for root). From these i need to create a binary
> > tree.
> >
> > for eg :
> > 1
> > 2 3
> > 4 5 6
> >
> >
> >
> > The sp returns
> >
> >
> > 1 2 1 0
> > 1 3 0 0
> >
> > 2 4 1 1
> > 2 5 0 1
> >
> > 3 6 1 0
> >
> >
> > Thanking in advance
> > Lara
> >
> >
> >
>
>
>


Nov 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: jova | last post by:
Is there a difference between a Binary Tree and a Binary Search Tree? If so can someone please explain. Thank You.
5
by: pembed2003 | last post by:
Hi, I have a question about how to walk a binary tree. Suppose that I have this binary tree: 8 / \ 5 16 / \ / \ 3 7 9 22 / \ / \ / \
15
by: Foodbank | last post by:
Hi all, I'm trying to do a binary search and collect some stats from a text file in order to compare the processing times of this program (binary searching) versus an old program using linked...
4
by: Ken | last post by:
I have a binary tree in VB NET and insertions seem to be slow. The program receives data from one source and inserts it into the tree. The program receives data from another source and...
3
by: piotrek | last post by:
Hi I would like to ask you a question. Ian creating app. that download from server directory structure ( whole tree ) and those data are placed in proper places into my treeview control. I...
1
by: mathon | last post by:
hi, now i facing a problem which i do not know how to solve it...:( My binary search tree structures stores a double number in every node, whereby a higher number is appended as right child...
1
by: hn.ft.pris | last post by:
I have the following code: Tree.h defines a simple binary search tree node structure ########## FILE Tree.h ################ #ifndef TREE_H #define TREE_H //using namespace std; template...
4
by: whitehatmiracle | last post by:
Hello I have written a program for a binary tree. On compiling one has to first chose option 1 and then delete or search. Im having some trouble with the balancing function. It seems to be going...
11
by: Defected | last post by:
Hi, How i can create a Binary Search Tree with a class ? thanks
7
by: Vinodh | last post by:
Started reading about Binary Trees and got the following questions in mind. Please help. Definition of a Binary Tree from "Data Structures using C and C++ by Tanenbaum" goes like this, "A...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.