package
Version:
v0.0.0-...-5ea41ec
Opens a new window with list of versions in this module.
Published: Jun 12, 2025
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
检查二进制字符串字段
给你一个二进制字符串 s ,该字符串 不含前导零 。
如果 s 包含 零个或一个由连续的 '1' 组成的字段 ,返回 true 。否则,返回 false 。
如果 s 中 由连续若干个 '1' 组成的字段 数量不超过 1,返回 true 。否则,返回 false 。
示例 1:
输入:s = "1001"
输出:false
解释:由连续若干个 '1' 组成的字段数量为 2,返回 false
示例 2:
输入:s = "110"
输出:true
提示:
1 <= s.length <= 100
s[i] 为 '0' 或 '1'
s[0] 为 '1'
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.