fenwick_2d
Maintains a 2D grid for point updates and rectangle sum queries, enabling cumulative-sum lookups across rows and columns.
Instructions
2D Fenwick tree for point updates and rectangle sum queries.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cols | Yes | Number of columns | |
| rows | Yes | Number of rows | |
| operations | Yes | Array of {type, row, col, row2?, col2?, value?} operations |