Hacker News new | ask | show | jobs
by matvore 946 days ago
If you store the number of zeros as value z, computing z+1 is O(log n) in the long run for unbounded values of z.