Would anyone be willing to explain problem '1019. Next Greater Node In Linked List' please

My code works for the first two cases, but fails on the third - my output is [9,9,9,9,0,5,0,0]. Upon seeing what case 3 would return, it is clear to me i don't understand the problem.

Would anyone be willing to spare a few moments to explain the problem to me differently please. I am not looking for coding answers or ideas, i just want to understand the problem fully. Thank you in advance

https://leetcode.com/problems/next-greater-node-in-linked-list/

Comments (1)