Design an IPv4 Address Iterator
Company: Anthropic
Role: Software Engineer
Category: Coding & Algorithms
Difficulty: medium
Interview Round: Technical Screen
Quick Answer: This question evaluates a candidate's ability to represent and iterate IPv4 addresses, covering parsing, numeric arithmetic with carry between octets, and the design of a stateful iterator.
Constraints
- All input IP strings are valid IPv4 addresses with octets in the range 0 to 255.
- `start_ip` is less than or equal to `end_ip` in numeric IPv4 order.