Print out an immutable singly linked list in reverse

https://leetcode.com/problems/print-immutable-linked-list-in-reverse/ (preminm)

Print out an imutable singly linked list in reverse in linear time (O(n)) and less than linear space (space<(O(n))

for example :

Given the linked list : 4-5-12-1-3
Your program should print : 3-1-12-5-4

Comments (30)