Skip to content

Commit c84e4b0

Browse files
committed
Day 34: add some follow-up thoughts
1 parent d8da013 commit c84e4b0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

day34/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,8 @@ function, it's also using and `O(n)` space.
5050

5151
## Follow-up
5252

53-
53+
We can reduce the linear time complexity by iterating over the entire input
54+
string once to find whether the string is an ipv4 or ipv6 candidate, and then
55+
doing the check on the string via iteration without the `.split(".")` or
56+
`.split(":")` calls. The iteration syntax may be a little messy though.
5457

0 commit comments

Comments
 (0)