frostcloud's blog

By frostcloud, history, 3 months ago, In English

Create a data structure, that can:

  1. Add/subtract a number on a segment;
  2. Count amount of negative numbers on a segment.

How to solve it for $$$O(\sqrt{n})$$$ / $$$O(\log^2{n})$$$ / $$$O(\log{n})$$$ per query?

Full text and comments »

  • Vote: I like it
  • +19
  • Vote: I do not like it