Product
Pricing
Blog
Forum
NEW
Referral
Description
Solution
Discussion
Submissions
Ask AI
AI Insights
Quick Summary
Design a forward-only iterator that yields sequential IPv4 addresses starting from a given string.
Implement `hasNext()` and `next()` methods ensuring O(1) time and space complexity per operation.
Manage internal state by converting dotted-decimal notation into a numeric representation for efficient iteration.
What This Tests
Iterator design pattern implementation
Conversion between string formats and numeric values
State management and boundary checking
Bitwise operations or base-256 arithmetic
Common Patterns
Iterator Pattern
Bit Manipulation
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Report
Report seen similar question in interview
Accepted
4.3k
/7.2k
Acceptance Rate
59.4%
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Python3
Auto
Debug
Run
Submit
Test Cases
Input
Output
Expected