in reply to Re: Recursion problem
in thread Recursion problem
First consider the case where the list has one element that matches the target:The base case is even simpler: for $target == 0 any list fulfills the condition, so a simple return 1 if $target == 0; should do.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Recursion problem
by psini (Deacon) on May 25, 2008 at 09:55 UTC | |
|
Re^3: Recursion problem
by BrowserUk (Patriarch) on May 25, 2008 at 10:27 UTC | |
by moritz (Cardinal) on May 25, 2008 at 10:40 UTC | |
by BrowserUk (Patriarch) on May 25, 2008 at 11:22 UTC | |
by moritz (Cardinal) on May 25, 2008 at 11:41 UTC | |
by BrowserUk (Patriarch) on May 25, 2008 at 12:02 UTC | |
|