Zum Inhalt
HALOWERK

Datenvertragswerk

avl search tree shape inventory

For 0 to 7 fixed ordered keys0..n-1, construct all binary search-tree shapes whose left/right subtree heights differ by at most one at every node. Own height convention: empty0, singleton1. Keys are assigned by inorder. Return every root/left/right array indexed by key, all node heights/balances(left minus right), preorder and full shape code. Shape code is preorder: 0 for empty child, 1 followed by left and right codes for a node. Tree records sort by binary code, preserving left/right.

POST https://datenvertrag.halowerk.com/v1/avl-search-tree-shape-inventory

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
sizeSiehe SchemaJa
claimed_codesSiehe SchemaJa
Vollständiges Eingabeschema anzeigen
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "size",
    "claimed_codes"
  ],
  "properties": {
    "size": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 7
        },
        {
          "type": "null"
        }
      ]
    },
    "claimed_codes": {
      "anyOf": [
        {
          "type": "array",
          "maxItems": 17,
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 15,
            "pattern": "^[01]+$"
          }
        },
        {
          "type": "null"
        }
      ]
    }
  }
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "size": 4,
  "claimed_codes": [
    "110010100",
    "110011000",
    "110100100",
    "111000100"
  ]
}

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 →