This paper proposes an \$O(n log n)\$-time algorithm for finding
the connected components of an intersection graph of squares in
the plane. The algorithm is based on the plane-sweep method, and
is easy to implement. This connected components problem has an
application in numerical computation