From: Clifford Heath Date: 2008-01-21T09:24:57+09:00 Subject: Re: kD-Trees implementation Marcin Raczkowski wrote: > Anyway thanks for posting this piece of article, Not a problem - thanks for sharing your kdtree implementation! > about finding median - my algorithm doesn't find it either But I think it does - you sort N elements and use the N/2'th element, which is the median. That guarantees a balanced tree. The r-tree (and priority r-tree) looks like a useful structure too - the equivalent of a b-tree for spatial data. Clifford Heath.