LC 58

Length of Last Word

Easy · LC 1–100

string
Free

候选解法路线

Primary

二分边界 / First True

Free

Invariant: 第一个 True 始终位于 [lo,hi];hi 一侧是保留的可行候选,lo 左侧已证为 False。

candidate confidence: 0.468 · metadata_only

如何使用本页

先读原题与 constraints,再逐一验证 Recognition signals、invariant 与 complexity;candidate score 不能证明正确性。