Skip to content

Latest commit

 

History

History
7 lines (4 loc) · 383 Bytes

README.md

File metadata and controls

7 lines (4 loc) · 383 Bytes

This problem was asked by Snapchat.

Given a string of digits, generate all possible valid IP address combinations.

IP addresses must follow the format A.B.C.D, where A, B, C, and D are numbers between 0 and 255. Zero-prefixed numbers, such as 01 and 065, are not allowed, except for 0 itself.

For example, given "2542540123", you should return ['254.25.40.123', '254.254.0.123'].