Implement cursor-based query pagination | Coinbase Interview Question