Skip to content

Instantly share code, notes, and snippets.

@AnimaWish
Created January 31, 2014 09:06
Show Gist options
  • Select an option

  • Save AnimaWish/8728744 to your computer and use it in GitHub Desktop.

Select an option

Save AnimaWish/8728744 to your computer and use it in GitHub Desktop.
int findMax(int[] array, int size) {
if(size == 1) {
return array[0];
} else {
return Math.max(findMax(array,size-1), array[size-1]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment