Diferente pentru blog/square-root-trick intre reviziile #71 si #72

Nu exista diferente intre titluri.

Diferente intre continut:

- set(i, x): A[i] := x,
- sum(lo, hi) returns A[lo] + A[lo+1] + .. + A[hi].
p. The naive solution uses an array. It takes $O(1)$ time for an update and $O(r-l) = O(n)$ for the range sum.
p. The naive solution uses an array. It takes $O(1)$ time for an update and $O(hi - lo) = O(n)$ for the range sum.
A more efficient solution splits the array into length $k$ slices and stores the slice sums in an array $S$.

Nu exista diferente intre securitate.

Topicul de forum nu a fost schimbat.