The TransCompilator

Solved LeetCode program · 179 of 1,000

#0206 · Reverse Linked List

Easy Linked List chunk-04.md

Original English source

The nodes is a list of 1, 2, 3, 4, and 5. The last is the last position of nodes.
For every step from 0 to last.
The spot is last minus step. Show item spot of nodes.

Open in Playground Browse all 1,000 problems

Expected stdout

5
4
3
2
1