logo

Crowdly

Browser

Add to Chrome

Mille leiab järgmine meetod etteantud kahendpuu puhul? int leia(Tipp juur) { ...

✅ 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 + leia(juur.vasak);

if (juur.parem != null)

vastus = Math.max(vastus, 1 + leia(juur.parem));

}

return vastus;

}

0%
0%
0%
0%
More questions like this

Want instant access to all verified answers on moodle.ut.ee?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome