Created
August 19, 2016 12:57
-
-
Save sbsatter/a14eddab3c6b44ef908f332017452227 to your computer and use it in GitHub Desktop.
CodingBat Recursion-1 > array220 : http://codingbat.com/prob/p173469
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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