---
title: "Discussion on \"LeetCode Challenge #5: Defanging an IP Address\" | Hashnode"
description: "Discussion on \"LeetCode Challenge #5: Defanging an IP Address\". Problem Statement\nGiven a valid (IPv4) IP address, return a defanged version of that IP address.\nA defanged IP address replaces every period \".\" with \"[.]\".\nExample 1:\nInput: address = \"1.1.1.1\"\nOutput: \"1[.]1[.]1[.]1\"\nStep-by-Step Solution\nIdentify ..."
url: "https://hashnode.com/posts/leetcode-challenge-5-defanging-an-ip-address/5ecfc0c7123fdcb70b9322b6"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [LeetCode Challenge #5: Defanging an IP Address](https://blog.lo-victoria.com/leetcode-challenge-5-defanging-an-ip-address?utm_source=hashnode&utm_medium=feed)

Problem Statement Given a valid (IPv4) IP address, return a defanged version of that IP address. A defanged IP address replaces every period "." with "\[.\]". Example 1: Input: address = "1.1.1.1" Output: "1\[.\]1\[.\]1\[.\]1" Step-by-Step Solution Identify ...

May 28, 2020 · blog.lo-victoria.com  
Read the article

-   [#challenge](https://hashnode.com/tag/challenge)
-   [#java](https://hashnode.com/tag/java)
-   [#leetcode](https://hashnode.com/tag/leetcode)

## Written by

[Victoria Lo](https://hashnode.com/@victoria)

@victoria · Singapore

  
[View profile](https://hashnode.com/@victoria)

A nerd in books, tea, games and software.

I'm a solutions engineer lead, GitHub Star, Director of WomenDevsSG, and co founder of ragTech. I work at the intersection of tech, systems, and leadership, and this blog is where I share my journey through all three. Expect honest reflections, real experiences, and thoughts that are still forming rather than polished career advice.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
