Skip to content

Instantly share code, notes, and snippets.

@sbsatter
Created August 19, 2016 12:57
Show Gist options
  • Save sbsatter/a14eddab3c6b44ef908f332017452227 to your computer and use it in GitHub Desktop.
Save sbsatter/a14eddab3c6b44ef908f332017452227 to your computer and use it in GitHub Desktop.
CodingBat Recursion-1 > array220 : http://codingbat.com/prob/p173469
public boolean array220(int[] nums, int index) {
if(index>=nums.length-1)
return false;
for(int i=index+1; i<nums.length; i++){
if((nums[index]*10)==nums[i]){
return true;
}
}
return array220(nums,index+1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment