def flatten(head: Node | None) -> Node | None:
The round: four reports, February to March 2026, three of them phone screens and one a coding round whose stage the report does not name. One names LeetCode 430, Flatten a Multilevel Doubly Linked List, and another gives its number. One describes a list with a down pointer: expand the down list first, then reconnect next. One says the hard part was explaining how the tail of the flattened child list connects back to the original next node; that candidate used recursion, got working code, and was still rejected after the round. One graded part.
The node (given)
class Node:
def __init__(self, val, prev=None, next=None, down=None): ...
Part 1 — flatten the list
def flatten(head: Node | None) -> Node | None: ...
next and prev along its own level, and an optional down pointer to the head of another list one level lower. A lower list can have down lists of its own.down list, already flattened, comes right after the node and before the node's old next.down is None, prev mirrors next all the way along, and head.prev is None.None.Notes: LeetCode 430 calls the extra pointer child; one report calls it down, which this page uses. One report says the list is doubly linked; the others do not say. If the interviewer's list is singly linked, there is no prev to fix; here the tests check it. The Node constructor and all examples are ours. One report suggests mentioning an iterative version to avoid deep recursion. One candidate says they answered the interviewer's follow-ups, but the report does not say what they were.
Four reports, February to March 2026, mostly phone screens. One candidate passed the screen with it. One candidate, for whom it was the only question, says the tricky part was explaining how the flattened child list's tail reconnects to the original next node; they used recursion, wrote working code with a dry run, answered the follow-ups, and were still rejected, and they think the bar was high. One report, written from memory, gives the approach as expand down, then reconnect next, by recursive DFS, and suggests mentioning iteration to avoid stack depth, with O(n) time and O(depth) space. Another report says Bloomberg interviews ask for a dry run, a time complexity explanation and edge cases.
What the reports say: LeetCode 430, mostly in phone screens, with a down pointer in one report. The point two reports stress is reconnecting the flattened child list's tail to the original next. Explain the pointer changes clearly before you code, and do a dry run; one candidate lost time there. Mentioning an iterative version to avoid deep recursion is suggested.
Common mistakes (ours, not reported): Losing the old next by overwriting it first; fixing next but not prev; leaving down set; walking each child list twice to find its tail.
Edge cases to test (ours): A down list on the last node; a down list on the head; nesting several levels deep; an empty list.
Also reported as Flatten a Multilevel Doubly Linked List · LeetCode 430
The round: four reports, February to March 2026, three of them phone screens and one a coding round whose stage the report does not name. One names LeetCode 430, Flatten a Multilevel Doubly Linked List, and another gives its number. One describes a list with a down pointer: expand the down list first, then reconnect next. One says the hard part was explaining how the tail of the flattened child list connects back to the original next node; that candidate used recursion, got working code, and was still rejected after the round. One graded part.
The node (given)
class Node:
def __init__(self, val, prev=None, next=None, down=None): ...
Part 1 — flatten the list
def flatten(head: Node | None) -> Node | None: ...
next and prev along its own level, and an optional down pointer to the head of another list one level lower. A lower list can have down lists of its own.down list, already flattened, comes right after the node and before the node's old next.down is None, prev mirrors next all the way along, and head.prev is None.None.Notes: LeetCode 430 calls the extra pointer child; one report calls it down, which this page uses. One report says the list is doubly linked; the others do not say. If the interviewer's list is singly linked, there is no prev to fix; here the tests check it. The Node constructor and all examples are ours. One report suggests mentioning an iterative version to avoid deep recursion. One candidate says they answered the interviewer's follow-ups, but the report does not say what they were.
What the reports say: LeetCode 430, mostly in phone screens, with a down pointer in one report. The point two reports stress is reconnecting the flattened child list's tail to the original next. Explain the pointer changes clearly before you code, and do a dry run; one candidate lost time there. Mentioning an iterative version to avoid deep recursion is suggested.
Common mistakes (ours, not reported): Losing the old next by overwriting it first; fixing next but not prev; leaving down set; walking each child list twice to find its tail.
Edge cases to test (ours): A down list on the last node; a down list on the head; nesting several levels deep; an empty list.
If you have had this round, tell us how close this page was. It is how we keep the pages accurate.
Send them this page. It is free to read, no account needed.
What you just read — canonical solution, follow-up arc, what passing candidates actually did — exists for all 65 Bloomberg questions, refreshed monthly from new candidate reports.