Pergunta de entrevista da empresa Oracle

Algorithm to solve a mathematical problem of pagination