Inspired by https://thecodingtrain.com/challenges/98-quadtree
A quadtree is a tree data structure in which each internal node has exactly four children: Northwest, Northeast, Southwest, and Southeast. 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. This data structure is used in many computational geometry algorithms, for example, to accelerate the Barnes–Hut simulation of the n-body problem.