Object-Oriented Programming · Coinbase · Medium
You are building the read side of a small in-memory table. Every record has a unique string id, an integer score, and a string payload. Implement the following read operations. query(rows, minScore, pageSize, cursor) considers every record whose score >= minScore, ordered by ascending score and then ascending id. A cursor value is either None or a two-item list [lastScore, lastId]. The cursor is exclusive: the next page may contain only records whose composite key (score,…
Checking your access…