Amazon interview question

Convert a number to a link list.