Search code examples
calgorithmquadtree

Quadtree explanation and C implementation


Please explain quadtrees and provide simple code (preferably in C) for insertion and searching.


Solution

  • Wikipedia has a good article on quadtrees. The quadtree section in these slides is very good.

    Here are some C implementations (found via Googling for quadtree c -"c++" -"c#"):