Flatten Binary Tree to Linked List

# Introduction In this challenge, we will be working with binary trees. The goal is to flatten a given binary tree into a singly linked list. The flattened tree should maintain the same order as a pre-order traversal of the original tree. The right child pointer should point to the next node in the flattened tree, and the left child pointer should be set to `null`. Two examples are provided to illustrate the expected input and output.

|60 : 00

Click the virtual machine below to start practicing