← Questions

Flatten a binary tree to a linked list

0
MetaCodingLast asked Aug 2025

Flatten a binary tree in place into a chain that follows pre-order, using the right pointers as next and setting every left pointer to null.

Write and test your solution herePython in your browser, the question's tests level by level, saved for you.Sign in to start coding