New
ML System Design & SQL tracks just landed
See what's new
×
Question Bank
Pricing
Blog
Forum
HOT
Referral
Description
Solution
Discussion
Submissions
Ask AI
Question Bank
OpenAI
Coding Question
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
Accepted
5.5k
/11k
Acceptance Rate
50.2%
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.6-Flash
0/2000
Auto
Debug
Run
Submit
Test Cases
Input
Output
Expected