Se consideră algoritmul Count(n, k), unde n și k sunt două numere naturale cu 0≤k≤n0 \le k \le n0≤k≤n.
Count(n, k)
Algoritm 1
Algorithm Count(n, k) If k = 0 or k = n then Return 1 EndIf Return Count(n - 1, k - 1) + Count(n - 1, k) EndAlgorithm
Ce face algoritmul?
6 / 22