Can someone help me with algo and code?
Result should be stored in new linked list.
I am looking for sample code which can impress an interviewer.