Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Select optimal graph algorithm based on problem constraints
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 53% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 15% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 41% | 0% |
| case-12 | ✗→✓ | ▲ Improved | -19% | 0% |
| case-14 | ✗→✓ | ▲ Improved | -8% | 0% |
Select the optimal graph algorithm based on problem constraints, graph properties, and performance requirements.
| Scenario | Algorithm | Complexity | |----------|-----------|------------| | Unweighted | BFS | O(V+E) | | Non-negative weights | Dijkstra | O((V+E)log V) | | Negative weights | Bellman-Ford | O(VE) | | All pairs | Floyd-Warshall | O(V^3) | | DAG | Topological + DP | O(V+E) |
| Scenario | Algorithm | Complexity | |----------|-----------|------------| | Sparse graph | Kruskal | O(E log E) | | Dense graph | Prim | O(V^2) or O(E log V) |
json{ "type": "object", "properties": { "problemType": { "type": "string", "enum": ["shortestPath", "mst", "connectivity", "flow", "matching", "traversal"] }, "graphProperties": { "type": "object" }, "constraints": { "type": "object", "properties": { "V": { "type": "integer" }, "E": { "type": "integer" }, "negativeWeights": { "type": "boolean" }, "negativeCycles": { "type": "boolean" } } } }, "required": ["problemType", "constraints"] }
json{ "type": "object", "properties": { "success": { "type": "boolean" }, "recommendedAlgorithm": { "type": "string" }, "complexity": { "type": "string" }, "alternatives": { "type": "array" }, "reasoning": { "type": "string" } }, "required": ["success", "recommendedAlgorithm"] }
Other measured skills in the registry, with their headline benchmark lift.