Given last node of singly linked list, how do we find head node?
Let's say given JSON:
{ "id": "A", "next": "B" }, { "id": "B", "next": "C" } { "id": "C", "next": "D" } { "id": "D", "next": null }
Now assume that above is not sorted and we need to figure out HEAD element 'A'.