✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Mille leiab järgmine meetod etteantud kahendpuu puhul?
int leia(Tipp juur) {
int vastus = 0;
if (juur != null) {
if (juur.vasak == null)
vastus = 1;
else
vastus = leia(juur.vasak);
vastus = vastus + leia(juur.parem);
}
return vastus;
}