InterviewDB
Question
·
Los Angeles
GIF Pagination: Return the Correct Page of GIF Results Given Offset and Limit Parameters
phone
Question Details
Problem You have a sorted list of GIF objects [{"id": str, "trending_score": int}]. Implement a paginate function that returns a page of results given offset and limit. If the caller passes cursor (the last-seen id) instead of offset, resolve the offset from the cursor first. Example: Follow-ups Offset-based vs. cursor-based pagination -- when does each break down at scale? What happens if a new GIF is inserted before the cursor position between two page fetches? How do you maintain consistency?…
Full Details
🔒
Unlock all Sofi questions
Full insider details, leaked discussions, and candidate experiences.
or every company, $100/year →About This Question
This is a reported interview question from a sofi interview during the phone round.
It covers the following topics: System Design, Coding, Phone, Onsite .