Closed
Description
Is there an existing issue for this?
- I have searched the existing issues
Feature Description
[Flatten Binary Tree to Linked List]
Given the root of a binary tree, flatten the tree into a "linked list":
The "linked list" should use the same TreeNode class where the right child pointer points to the next node in the list and the left child pointer is always null.
The "linked list" should be in the same order as a preorder traversal of the binary tree.
Use Case
For users to be able to see the solutions and understand it.
Benefits
No response
Add ScreenShots
No response
Priority
High
Record
- I have read the Contributing Guidelines
- I'm a GSSOC'24 contributor
- I have starred the repository
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done