Skip to content

Instantly share code, notes, and snippets.

@AbhijeetMajumdar
AbhijeetMajumdar / quadtree.java
Last active April 1, 2025 03:53
Quadtree Java implementation
A quadtree is a tree data structure in which each internal node has exactly four children. Quadtrees are most often used to
partition a two-dimensional space by recursively subdividing it into four quadrants or regions. The regions may be square or
rectangular, or may have arbitrary shapes.
More on
https://en.wikipedia.org/wiki/Quadtree
Thanks to Jim for such an excellent visual representation on http://jimkang.com/quadtreevis/