Hello! I'm a high school student, and I'm having some trouble learning
recursion in my class...
For example:
Trace the sequence of recursive calls that glee(2,1) spawns:
def glee ( idol , scrub ) :
if idol == 0 :
return scrub
elif idol < 0 :
return scrub + glee ( idol + 10 , idol % 3 )
else :
This problem told me to use map and filter, so how would I use that to
solve it?
remove ( 5 , 6 )
6
remove ( 5 , 5 )
remove ( 1 , [1 , [1 , [2 , 13]] , 1 , [2] , 5] )
[[[2 , 13]] , [2] , 5]
remove ( 2 , [1 , [1 , [2 , 13]] , 1 , [2] , 5] )
[1 , [1 , [13]] , 1 , [] , 5]
Thanks!
--
Usi