Bloomberg interview question

Follow Leet code and Linked list