datenvertrag.halowerk.com/v1/prepost-binary-tree-fiber-inventory
For two permutations of the same anonymous labels0..n-1,n0..5, reconstruct ALL ordered binary trees with exactly the supplied root-left-right preorder and left-right-root postorder. Unary children may be left or right; do not assume uniqueness. Return full tree family and count. A tree code is preorder with explicit null child markers; null sorts before numericlabels, whole codes lexsort numerical
POST
https://datenvertrag.halowerk.com/v1/prepost-binary-tree-fiber-inventoryUptime100% of 1 check in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://datenvertrag.halowerk.com/v1/prepost-binary-tree-fiber-inventory", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"claim":[[2,0,null,null,1,null,null]],"postorder":[0,1,2],"preorder":[2,0,1]}),
});
console.log(await res.json());Example input
{
"claim": [
[
2,
0,
null,
null,
1,
null,
null
]
],
"postorder": [
0,
1,
2
],
"preorder": [
2,
0,
1
]
}