← Questions
Build a quadtree
0
I was asked this
No reports yet. Sign in to say where you were asked it.
A quadtree splits a 2D region into four quadrants, recursively: every node is either a leaf or has exactly four children.
Build one yourself. One version builds it from a square grid, splitting until a region holds a single value (values are not limited to 0 and 1). Another stores 2D geographic points. Ask the questions that shape the build, such as whether the side length is a power of two, and give the cost.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
