LC 6

Zigzag Conversion

Medium · LC 1–100

string
Free

Candidate solution routes

Primary

Parsing / token state machine

Free

Invariant: Before each loop, s[:i] has been completely and non-overlappingly tokenized; the next rule consumes at least one character or reports an error.

candidate confidence: 0.236 · metadata_only

How to use this page

Read the statement and constraints first, then validate recognition signals, invariant, and complexity. Candidate score is not correctness evidence.