mirror of
https://github.com/youngyangyang04/leetcode-master.git
synced 2025-07-07 07:35:35 +08:00
93.复原IP地址错别字修正
This commit is contained in:
@ -143,7 +143,7 @@ for (int i = startIndex; i < s.size(); i++) {
|
||||
代码如下:
|
||||
|
||||
```CPP
|
||||
// 判断字符串s在左闭又闭区间[start, end]所组成的数字是否合法
|
||||
// 判断字符串s在左闭右闭区间[start, end]所组成的数字是否合法
|
||||
bool isValid(const string& s, int start, int end) {
|
||||
if (start > end) {
|
||||
return false;
|
||||
@ -208,7 +208,7 @@ private:
|
||||
} else break; // 不合法,直接结束本层循环
|
||||
}
|
||||
}
|
||||
// 判断字符串s在左闭又闭区间[start, end]所组成的数字是否合法
|
||||
// 判断字符串s在左闭右闭区间[start, end]所组成的数字是否合法
|
||||
bool isValid(const string& s, int start, int end) {
|
||||
if (start > end) {
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user