</>OfferRetriever
DashboardDiscuss
NEW

Spring Hire Sale

Limited Time Deal: Unlock all premium questions for over 30% off

$10.42$7.08

08

:

03

:

15

:

08

Get this deal
Back to Dashboard

Paged Data Reader

Medium
FREE

You have an external data source that serves records in fixed pages. The data source is represented as a list of pages, where each page is a list of strings. Implement a PagedReader class that wraps this data source and exposes a single method to retrieve records sequentially, regardless of page boundaries.

The class is constructed with the full page data (a list of lists of strings) simulating the external API. It must maintain internal state so that each call to getNext continues from where the previous call left off. ...