What is the definition of IP???


  • 0

    I don't get it. Why all those IP are invalid?
    Input:
    "172162541"
    Output:
    ["1.72.162.541","1.721.62.541","1.721.625.41","17.2.162.541","17.21.62.541","17.21.625.41","17.216.2.541","17.216.25.41","17.216.254.1","172.1.62.541","172.1.625.41","172.16.2.541","172.16.25.41","172.16.254.1","172.162.5.41","172.162.54.1"]
    Expected:
    ["17.216.25.41","17.216.254.1","172.16.25.41","172.16.254.1","172.162.5.41","172.162.54.1"]


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.