PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Coding & Algorithms/Lyft

Implement paginated retrieval of transactions

Last updated: Apr 20, 2026

Quick Overview

This question evaluates a candidate's competency in implementing efficient paginated data retrieval and API design, covering offset- and cursor-based pagination, stable ordering when timestamps collide, consistency concerns when new records arrive, and analysis of time and space complexity.

  • Medium
  • Lyft
  • Coding & Algorithms
  • Software Engineer

Implement paginated retrieval of transactions

Company: Lyft

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Onsite

Given a large list of transaction records (id, userId, amount, createdAt), implement APIs to return transactions in reverse chronological order with pagination. Support both offset-based and cursor-based (createdAt,id) pagination; return page data plus metadata (hasNext, nextCursor, total if offset mode). Ensure stable ordering when multiple transactions share the same timestamp, and discuss how to keep results consistent when new records arrive between requests. Provide time/space complexities and key edge cases.

Quick Answer: This question evaluates a candidate's competency in implementing efficient paginated data retrieval and API design, covering offset- and cursor-based pagination, stable ordering when timestamps collide, consistency concerns when new records arrive, and analysis of time and space complexity.

Related Interview Questions

  • Implement Grid Spread and Transactional Store - Lyft (hard)
  • Assign Minimum Workers to Jobs - Lyft (medium)
  • Solve substring and worker assignment - Lyft (medium)
  • Implement Cache and Key-Value Store - Lyft (medium)
  • Implement command-driven in-memory key-value database - Lyft (Medium)
Lyft logo
Lyft
Jul 27, 2025, 12:00 AM
Software Engineer
Onsite
Coding & Algorithms
6
0

Given a large list of transaction records (id, userId, amount, createdAt), implement APIs to return transactions in reverse chronological order with pagination. Support both offset-based and cursor-based (createdAt,id) pagination; return page data plus metadata (hasNext, nextCursor, total if offset mode). Ensure stable ordering when multiple transactions share the same timestamp, and discuss how to keep results consistent when new records arrive between requests. Provide time/space complexities and key edge cases.

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Lyft•More Software Engineer•Lyft Software Engineer•Lyft Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.