Class Solution
java.lang.Object
g1101_1200.s1108_defanging_an_ip_address.Solution
1108 - Defanging an IP Address.<p>Easy</p>
<p>Given a valid (IPv4) IP <code>address</code>, return a defanged version of that IP address.</p>
<p>A <em>defanged IP address</em> replaces every period <code>"."</code> with <code>"[.]"</code>.</p>
<p><strong>Example 1:</strong></p>
<p><strong>Input:</strong> address = “1.1.1.1”</p>
<p><strong>Output:</strong> “1[.]1[.]1[.]1”</p>
<p><strong>Example 2:</strong></p>
<p><strong>Input:</strong> address = “255.100.50.0”</p>
<p><strong>Output:</strong> “255[.]100[.]50[.]0”</p>
<p><strong>Constraints:</strong></p>
<ul>
<li>The given <code>address</code> is a valid IPv4 address.</li>
</ul>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Solution
public Solution()
-
-
Method Details
-
defangIPaddr
-