Implement n-tail (return last n elements)

Problem: Implement n-tail (return last n elements)

Given a linear sequence arr (e.g., an array or list) and an integer n, implement a function that returns the tail of the sequence — i.e.,...

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: