Note: I did not talk about the time and space complexities in this video so below are the respective complexities:
Time Complexity: O(N) - Because we are making two recursive calls on each node to create the left & right subtrees and each subtree is processed
Space Complexity: O(N) - Because we are creating a new TreeNode for each element in the input array.
On this page of the site you can watch the video online Leetcode with a duration of hours minute second in good quality, which was uploaded by the user UcheCodez 27 May 2024, share the link with friends and acquaintances, this video has already been watched 180 times on youtube and it was liked by 3 viewers. Enjoy your viewing!