Defanging An Ip Address, is a LeetCode problem. In this post we will see how we can solve this challenge in C++

Problem Description

Example 1:

Input: address = "1.1.1.1" Output: "1[.]1[.]1[.]1"

Example 2:

Input: address = "255.100.50.0" Output: "255[.]100[.]50[.]0"

Constraints:

....

You can find the full details of the problem Defanging an IP Address at LeetCode

Solution: Please check the main.cpp snippet for the solution.

This solution originally posted at: Github by @kamyu104