114. Flatten Binary Tree to Linked List

time: O(n)

space: O(n), which is occupied by the recursion stack

space O(1), next time...

Last updated

Was this helpful?