Skip to content
HALOWERK

Datenvertragswerk

stack sort permutation image

Compute the full image of one captured permutation under one pass of the deterministic West stack-sorting map. Read the word from left to right. Before pushing a new value, pop every smaller stack top into the output; after the final input, drain the stack. Return the entire output word. For example, [1,2,0] maps to [1,0,2], whereas [2,0,1] maps to [0,1,2]. This is a single pass and need not produce sorted order. The input is a permutation of exactly 0,.,n-1 for n=0..6; empty maps to.

POST https://datenvertrag.halowerk.com/v1/stack-sort-permutation-image

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
permutationSee schemaYes
claimSee schemaYes
Show full input schema
{
  "type": "object",
  "properties": {
    "permutation": {
      "anyOf": [
        {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 5
          },
          "minItems": 0,
          "maxItems": 6,
          "uniqueItems": true
        },
        {
          "type": "null"
        }
      ]
    },
    "claim": {
      "anyOf": [
        {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0,
            "maximum": 5
          },
          "minItems": 0,
          "maxItems": 6,
          "uniqueItems": true
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "permutation",
    "claim"
  ],
  "additionalProperties": false
}

Open original schema

Published input example

{
  "permutation": [],
  "claim": []
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub โ†’