Explore BrainMass
Share

Explore BrainMass

    Simple Recursion Function

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    My goal is, given this function prototype, I need the recursive definition of the function.

    int Location(ArrayType a, int first, int last, Element elm)
    {
    /* returns the location of elm in a[first], ... , a[last]. If not found, return 0 */
    }

    © BrainMass Inc. brainmass.com October 10, 2019, 5:31 am ad1c9bdddf
    https://brainmass.com/computer-science/algorithms/simple-recursion-function-508157

    Solution Preview

    int Location(int[] a, int first, int last, int elm)
    {
    /* returns the location of elm in a[first], ... , a[last]. If not found, return 0 */
    ...

    Solution Summary

    This solution shows how to find the recursion definition of a function prototype.

    $2.19