6
Being a binary tree a set of records that meets certain conditions.
I would like to know how best to implement a binary search tree in language C
would be using a structure with head or without head?
Not taking into consideration its scanning mode e-r-d
, r-e-d
...
I know that the address of a binary tree is the address of its root and so how should I proceed?
And your question is whether the use of this structure is viable or not?
– DaviAragao
Daviaragao What would be the best way to use this structure, with or without head. I would like to know the difference in performance between both
– Pena Pintada
The best way in the case you presented is to create a pointer to root, which will only serve to point anyway, so it will be easy to balance the tree in case of later inserts. It is good that you know how to work with pointers, since you will move with pointer. Answered?
– Cristopher Vidal Machado
Cristopher Vidal Machado ,the part of handling pointers I already understand!! But in this case I should create a "head" for the tree or work directly with the structure without a head? Thanks guy, thank you!
– Pena Pintada