Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static boolean recursive2(int[] luvut, int sum, int index) {
- return (index == luvut.length) ? (sum == 0) : (recursive2(luvut, sum + luvut[index], index + 1) || recursive2(luvut, sum - luvut[index], index + 1));
- }
Add Comment
Please, Sign In to add comment