Bloomberg Interview Question

flatten a multilevel linked list