Google Interview Question

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