Restore IP Addresses
A valid IP address consists of exactly four integers separated by single dots. Each integer is between 0 and 255 (inclusive) and cannot have leading zeros. Given a string s containing only digits, return all possible valid IP addresses that can be formed by inserting dots into s.
Restore IP Addresses

A valid IP address consists of exactly four integers separated by single dots. Each integer is between 0 and 255 (inclusive) and cannot have leading zeros. Given a string s containing only digits, return all possible valid IP addresses that can be formed by inserting dots into s.

Example 1:
Input: "25525511135"
Output: ["255.255.11.135","255.255.111.35"]
Input
arr ="25525511135"
Building IP Address

___

.

___

.

___

.

___

Valid IP Addresses (0)

No valid IPs found yet

Find valid IP addresses in "25525511135"

Variables
VariableValue
s25525511135
DepthFunction Call
Stack empty
0/86