Question: Write a recursive algorithm that determines whether a specified target character is present in a string. It should return true if the target is present
Write a recursive algorithm that determines whether a specified target character is present in a string. It should return true if the target is present and false if it is not. The stopping steps should be
a. a string reference to null or a string of length 0, the result is false
b. the first character in the string is the target, the result is true.
The recursive step would involve searching the rest of the string.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
