Zemingo Interview Question

How would you implement a pagination logic?