Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int jumpIt(const int arr[], int startIndex, int numOfCol)
- {
- if(startIndex >= numOfCol && numOfCol % 2 == 0)
- return arr[numOfCol];
- if(startIndex >= numOfCol && numOfCol % 2 != 0)
- return arr[numOfCol];
- if(arr[startIndex+1] < arr[startIndex+2] && startIndex+2 != numOfCol)
- return (arr[startIndex] + jumpIt(arr, startIndex+1, numOfCol));
- if(arr[startIndex+2] < arr[startIndex+1]);
- return (arr[startIndex] + jumpIt(arr, startIndex+2, numOfCol));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement