Implement tail -n (print last N lines)
Coding: Implement tail -n
Implement a simplified tail -n: read text from stdin and print the last n lines.
Input (stdin)
- Line 1: an integer
n(1 <= n <= 1e5). - Followed by
mli...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
