Explain how you analyze the computational complexity of a recursive function versus an iterative approach when processing hierarchical data.