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 = "" Output: "1[.]1[.]1[.]1"

Example 2:

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



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