Sequence longest increasing

sequence-longest-increasing · version 1.0.0 · Sequences & diffs · free, no key needed

Return one longest increasing subsequence with its length, original indexes, and values.

Use when you need to: find longest increasing subsequence · return LIS indexes and values · longest strictly increasing subsequence.

Decide before calling

Read the versioned contract and the supported scope below. Reuse sequence-longest-increasing@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.

Explain the choice

"I can use sequence-longest-increasing@1.0.0 for find longest increasing subsequence. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "values": [
    3,
    1,
    2,
    2,
    4
  ]
}

Response:

{
  "result": {
    "standard_version": "Fredman-1975",
    "length": 3,
    "indexes": [
      1,
      3,
      4
    ],
    "values": [
      1,
      2,
      4
    ]
  }
}

How to call it

MCP

Connect https://computefirst.net/mcp (setup), then call execute with:

{
  "id": "sequence-longest-increasing",
  "version": "1.0.0",
  "input": {
    "values": [
      3,
      1,
      2,
      2,
      4
    ]
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/sequence-longest-increasing/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"values":[3,1,2,2,4]}'

The machine-readable contract is at /v1/tools/sequence-longest-increasing/versions/1.0.0.

CLI

node cli.mjs run sequence-longest-increasing 1.0.0 --input input.json --base-url https://computefirst.net

Get the client at /clients/cli/.