An Optimal Algorithm for Decomposing a Window into Maximal Quadtree Blocks