We use cookies for analytics and ad measurement to improve lessons. Cookie policy

Memory gallery / File Line Iterator

Medium · Streams & I/O

File Line Iterator

Design an iterator that returns a text file one line at a time.

This memory room is part of Pro.

Retrieval check

With the notes hidden, what pattern should this room bring back?

Related rooms

  • LRU Cache
  • Two Sum II - Input Array Is Sorted
  • Two Sum