fenwick_tree
Build a Binary Indexed Tree from values, apply point updates, and answer range sum and point queries.
Instructions
Build a Fenwick tree (Binary Indexed Tree) from values and run point updates and range sum queries.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"values": "<values>"
},
"name": "fenwick_tree"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| values | Yes | Initial array of numbers | |
| operations | No | Operations: {type:'update',index,delta}, {type:'query',left,right}, {type:'point_query',index} |