Implement tail N lines | Confluent Interview Question