Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int L(Node korzen,string wartosc)
- {
- Node obecny = korzen;
- int licznik = 0;
- if (obecny == null)
- {
- Console.WriteLine("BRAK WYNIKÓW");
- }
- if (cmp1(wartosc, obecny.wartosc) == 0 && obecny.lewy!=null && obecny.prawy!=null )
- {
- licznik++;
- return L(obecny.lewy,wartosc)+ L(obecny.prawy, wartosc)+1;
- }
- else if (cmp1(wartosc, obecny.wartosc) < 0)
- {
- obecny = obecny.lewy;
- }
- else if (cmp1(wartosc, obecny.wartosc) > 0)
- {
- obecny = obecny.prawy;
- }
- return licznik;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement