Zum Inhalt
HALOWERK

Datenvertragswerk

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 numerically. Emptytraversals give oneemptytree[null]; inconsistentvalidtraversals give knownemptyfamily..

POST https://datenvertrag.halowerk.com/v1/prepost-binary-tree-fiber-inventory

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
preorderSiehe SchemaJa
postorderSiehe SchemaJa
claimSiehe SchemaJa
Vollständiges Eingabeschema anzeigen
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "preorder",
    "postorder",
    "claim"
  ],
  "properties": {
    "preorder": {
      "anyOf": [
        {
          "type": "array",
          "maxItems": 5,
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 4
          },
          "uniqueItems": true
        },
        {
          "type": "null"
        }
      ]
    },
    "postorder": {
      "anyOf": [
        {
          "type": "array",
          "maxItems": 5,
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 4
          },
          "uniqueItems": true
        },
        {
          "type": "null"
        }
      ]
    },
    "claim": {
      "anyOf": [
        {
          "type": "array",
          "maxItems": 32,
          "items": {
            "type": "array",
            "maxItems": 11,
            "items": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 4
                },
                {
                  "type": "null"
                }
              ]
            },
            "minItems": 1
          }
        },
        {
          "type": "null"
        }
      ]
    }
  }
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "preorder": [
    2,
    0,
    1
  ],
  "postorder": [
    0,
    1,
    2
  ],
  "claim": [
    [
      2,
      0,
      null,
      null,
      1,
      null,
      null
    ]
  ]
}

Ergebnis & Dokumentation

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-07, 02:42 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →