Time Complexity For Recursive Function In Python