Google interview question

How do you figure out time and space complexity of recursive function?