← Back to experiences
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/experiences/…$
Level: Mid-Level
Round: Phone Screen · Type: Coding · Difficulty: 3/10 · Duration: 60 min · Interviewer: Neutral
Topics: API, Data Fetching
Location: San Francisco Bay Area
Interview date: 2025-08-15
I was asked to implement a function to fetch data from a paginated API.
I was given an API fetch_page(page_number) that returns a page of data. Each page contains a list of results data and a next_page_number to fetch the next page. If next_page_number is null, there's no more data.
I needed to implement fetch(n) to fetch at most n data points by calling fetch_page.