Halloween Sale
Unlock all premium questions for over 30% off
Tail Last N Lines
Easy
Question
Write a function that behaves like the Linux command tail -n. The file is handed to you as a list of strings, one string per line, and you must return its final n lines. When the file has fewer than n lines, return every line it has.
...
Asked at:Confluent
More Confluent interview questions
- Variadic Function Signature Matchingmedium
- Design Phrase Search Inverted Indexhard
- Monster Hierarchy Battlehard
- Design Infinite Queue With Constant-Time GetRandommedium
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.