Revert the collection

Report a typo

Define a generic function invert which takes a generic List, inverts this collection and prints the list (with a line break at the end). You shouldn't change the original list here!

Example input

[hello, bonjour, guten tag]

Example output

[guten tag, bonjour, hello]

Write a program in Kotlin
// write your code here
___

Create a free account to access the full topic