Valid IPv4 Address — Solution & Editorial
Split on dots: exactly four all-digit parts, each ≤ 255, no leading zero unless the part is exactly 0.
Complexity: O(|S|)
Split on dots: exactly four all-digit parts, each ≤ 255, no leading zero unless the part is exactly 0.
Complexity: O(|S|)