sparse_table
Build a sparse table to answer O(1) range minimum or maximum queries on a static numeric array, with optional inclusive [left, right] query pairs.
Instructions
Build a sparse table for O(1) range minimum or maximum queries on a static array.
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": {
"array": "<array>"
},
"name": "sparse_table"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Query mode: 'min' or 'max' (default: min) | |
| array | Yes | Array of numbers | |
| queries | No | Range queries as [left, right] pairs (inclusive) |