Iterative approach: takes 85 steps. However, the number of steps will double as the tree gets larger compared to the recursive functionbranches become more nested. That's because as Iyou walk the nodes, I walk themthey are walked in trios counting. Counting the root nodes branchesroots while unpacking the right and left nodes, culminatingside. Culminating the countcounts on every retrograde iteration as I passunpacking, while passing every root object more than once. time complexity is O(N^2) for every nested object added it will be touched twice, once on entering and a second time on exiting.