Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % BST incomplet a carui noduri sunt liste adanci - sa se caute un atom (primul gasit)
- % subpunctul a de la subiectul C partea 2
- searchbi(A,_):var(A),!,fail.
- searchbi(t(K,L,R),Key):-membera(Key,K),!.
- searchbi(t([H|T],L,R),Key):-first_key(H,X),Key<X,!,searchbi(L,Key).
- searchbi(t(K,L,R),Key):-last_key2(K,V),V<Key,!,searchbi(R,Key).
- first_key([First|_],First):-atomic(H),!.
- first_key([H|_],R):-first_key(H,R).
- nu merge: zice "no"
- habar n-am
Add Comment
Please, Sign In to add comment