Sequence longest common substring

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

Find the longest contiguous common subarray of two bounded sequences.

Use when you need to: sequence lcsubstring · longest common substring of two sequences · longest contiguous common subarray.

Supported

Not supported

Behavior

Input

Output

Limits

Example

Request input:

{
  "left": [
    "A",
    "B",
    "C",
    "D"
  ],
  "right": [
    "X",
    "B",
    "C",
    "Y"
  ]
}

Response:

{
  "result": {
    "items": [
      "B",
      "C"
    ],
    "length": 2,
    "left_start": 1,
    "right_start": 1
  }
}

How to call it

MCP

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

{
  "id": "sequence-lcsubstring",
  "version": "1.0.0",
  "input": {
    "left": [
      "A",
      "B",
      "C",
      "D"
    ],
    "right": [
      "X",
      "B",
      "C",
      "Y"
    ]
  }
}

HTTP (no key)

curl -X POST https://computefirst.net/v1/tools/sequence-lcsubstring/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"left":["A","B","C","D"],"right":["X","B","C","Y"]}'

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

CLI

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

Get the client at /clients/cli/.