Question: Write a recursive boolean method named isMember. The method should search an array for a specified value, and return true if the value is found
Write a recursive boolean method named isMember. The method should search an array for a specified value, and return true if the value is found in the array, or false if the value is not found in the array. Demonstrate the method in a program.
Step by Step Solution
3.34 Rating (175 Votes )
There are 3 Steps involved in it
Algorithm isMemberint a int size int x Start for i 0 to size1 do if ai x then return true End of for ... View full answer
Get step-by-step solutions from verified subject matter experts
