g1101_1200.s1108_defanging_an_ip_address.Solution Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of leetcode-in-java Show documentation
Show all versions of leetcode-in-java Show documentation
Java-based LeetCode algorithm problem solutions, regularly updated
package g1101_1200.s1108_defanging_an_ip_address;
// #Easy #String #2022_02_28_Time_0_ms_(100.00%)_Space_42.6_MB_(5.79%)
public class Solution {
public String defangIPaddr(String address) {
return address.replace(".", "[.]");
}
}