识别信号
- Do you handle mismatched closing brackets without scanning the entire string?
- Can you explain why using counts alone does not guarantee validity in nested brackets?
解题流程
- 1. 明确窗口/状态定义
- 2. 更新状态并维护约束
- 3. 用边界样例验证
常见失分点
- Relying only on counts of brackets, which ignores nesting order and can produce false positives.