[leetcode]93. Restore IP Addresses还原IP地址

Posted liuliu5151

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[leetcode]93. Restore IP Addresses还原IP地址相关的知识,希望对你有一定的参考价值。

Given a string containing only digits, restore it by returning all possible valid IP address combinations.

Example:

Input: "25525511135"
Output: ["255.255.11.135", "255.255.111.35"]

 

题意

给定一个没加点的IP地址,返回所有可能的合法IP地址。

 

思路:DFS

 

 

代码

 

以上是关于[leetcode]93. Restore IP Addresses还原IP地址的主要内容,如果未能解决你的问题,请参考以下文章

[LeetCode] 93. Restore IP Addresses

[leetcode]93. Restore IP Addresses还原IP地址

LeetCode-93-Restore IP Addresses

LeetCode93. Restore IP Addresses 面试题

leetcode 93-Restore IP Addresses(medium)

[LeetCode] 93. Restore IP Addresses