O
O
Oleg Titarenko2015-02-17 00:56:42
Java
Oleg Titarenko, 2015-02-17 00:56:42

How to solve this problem in Java using recursion?

I've been scratching my head for a week now on how to solve it correctly, maybe you can help. Because I'm already exhausted.
Here is the condition there is a two-dimensional int array with such values
int[][] args = { {1,2},{2,3} };
​​Using recursion, calculate the sum of int between arrays. Example: 1 + 1; 1+2; 1+2; 1+3;
Well, that's all ...
In any case, thanks for the help)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Shultc, 2015-02-17
@Shultc

Why write off from us? Write off from a classmate, there will be the same sense.

Жаба (что-то){
 if (что-то.глубина < 2){
  вернуть: что-то[0] + что-то[1];
 } else
 for (int i = 0; i < что-то.длинна; i++)
  вернуть: Жаба(i);
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question