Hi Thanks for replying,
I'm learning how to use BBcode
I can't make the max_profit function to work,
The map is giving problem, It was supposed to take a function as a first argument and iterable as another,
but Its giving a error as:
sorry for not formatting I'm going through the help page to learn bbcode.
I'm learning how to use BBcode
I can't make the max_profit function to work,
The map is giving problem, It was supposed to take a function as a first argument and iterable as another,
but Its giving a error as:
Error:Traceback (most recent call last):
File "f:\coding n stuffs\asdfasda.py", line 97, in <module>
y = tree.max_profit(1)
File "f:\coding n stuffs\asdfasda.py", line 65, in max_profit
return max(-x,self[identifier] + sum(map(max_profit, self[identifier].children)))
NameError: name 'max_profit' is not defined
PS F:\coding n stuffs>sorry for not formatting I'm going through the help page to learn bbcode.