Stateful Fetch N Items from a Paginated API

Problem: Implement Stateful Paginated fetch_n

An upstream paginated API is available:

fetch(page_id) -> (items, next_page_id)
  • items is the list of elements in the current pag...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: