We present efficient algorithms for two problems concerning the discrepancy of a set S of n points in the unit square in the plane. First, we describe an algorithm for maintaining the half-plane discrepancy of S under insertions and deletions of points. The algorithm runs in O(n log n) worst-case time per update, and it requires only relatively simple data structures. Second, we give an algorithm that computes the strip discrepancy of S in O(n2α(n) log n) time, where α(n) is the extremely slowly growing functional inverse of Ackermann's function.
De Berg, M. (1996). Computing half-plane and strip discrepancy of planar point sets. Computational Geometry: Theory and Applications, 6(2), 69–83. https://doi.org/10.1016/0925-7721(95)00010-0