Application

Report a typo

The FIFO behavior implies that the first element is the first to be processed; in LIFO, the first element is processed last. Transform the original list so that it satisfies the LIFO contract by looping through it sequentially from the first element to the last.

Sample Input 1:

blue red orange black

Sample Output 1:

[black, orange, red, blue]
Write a program in Kotlin
fun main() {
val list = readln().split(" ")
// write your code here
val res =


println(res)
}
___

Create a free account to access the full topic