A
UBB · Informatică
58 Raspunsuri multiple

Se consideră algoritmul recursiv A și apelul său B(m, n).

Algoritm 1

Algorithm A(m, n, i, s1, s2)
  If i = n + 1 then Return s1 − s2 EndIf
  x ← 0; For j ← 1,n execute x ← x + m[i][j] EndFor
  If i MOD 2 = 0 then s1 ← s1 + x Else s2 ← s2 + x EndIf
  Return A(m, n, i + 1, s1, s2)
EndAlgorithm

Care dintre următoarele afirmații sunt adevărate?

13 / 21