Fetching algorithms...
root = [1,2,3,null,5,null,4]
[1,3,4]
root = [1,2,3,4,null,null,null,5]
[1,3,4,5]
Time Complexity
Space Complexity