Bloomberg interview question

leetcode flatten a linked list