Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define (acha-maior-ab uma-ab)
- (cond
- [(empty? uma-ab)
- 0]
- [else
- (maior-entre-3 (nó-id uma-ab) (recursao (nó-dir uma-ab)) (recursao (nó-esq uma-ab)))]))
- (define (maior-entre-3 n1 n2 n3)
- (cond
- [(and (> n1 n2) (> n1 n3))
- n1]
- [(and (> n2 n1) (> n2 n3))
- n2]
- [(and (> n3 n1) (> n3 n2))
- n3]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement