Description
Given a string containing only digits, restore it by returning all possible valid IP address combinations.
Example:
1 | Input: "25525511135" |
解法
暴力搜索三个点的位置,然后对分割后的ip进行检测即可。
注意check函数的写法
具体代码如下:
1 | class Solution { |
Thinking outside the box
Given a string containing only digits, restore it by returning all possible valid IP address combinations.
Example:
1 | Input: "25525511135" |
暴力搜索三个点的位置,然后对分割后的ip进行检测即可。
注意check函数的写法
具体代码如下:
1 | class Solution { |