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