Defanging an IP Address
Given a valid (IPv4) IP address
, return a defanged version of that IP address.
A defanged IP address replaces every period "."
with "[.]"
.
Example 1:
Example 2:
Constraints:
The given
address
is a valid IPv4 address.
Solutions
🧠 Cpp
Last updated