I have a tree 2 dimensions and its structure is as follows:
public class KDNodo{
int x;
int y;
KDNodo left;
KDNodo rigth;
}
public KDTree{
KDNodo root;
}
It is necessary to have in the odd levels the x is taken and that the nodes that have values lower than x are put to the left and those that have values superior or equal to the right.
Even levels do the same but with the y.
Can someone give me an example of a search? Thanks.