Name: Anonymous 2007-05-11 16:50 ID:tCgeez6Q
I receive a string, and I want to remove any 'a', 'b' and 'c' characters, in a recursive way.
How do I do this in C and Java?
Thanks
How do I do this in C and Java?
Thanks
@tail_call
def f(i, o=''):
if not i: return o
if i[0] in ['a', 'b', 'c']: return f(i[1:], o)
return f(i[1:], o + i[0])