Advertisement
StivenGonzalez

Untitled

Sep 4th, 2020
1,875
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scheme 0.78 KB | None | 0 0
  1. (define-struct arbol (raiz hizq hd))
  2.  
  3. ;Arbol
  4. (define arbol1 (make-arbol 20
  5.  
  6.                            (make-arbol 10 empty
  7.  
  8.  
  9.  
  10.                                        (make-arbol 5 empty
  11.  
  12.                                                    (make-arbol 7 empty empty)))
  13.  
  14.   (make-arbol 24
  15.  
  16.               (make-arbol 22 empty empty)
  17.  
  18.               (make-arbol 30 empty empty)
  19.  
  20.               )
  21.   )
  22.   )
  23.  
  24.  
  25. ;Arbol 2
  26. (define arbol2 (make-arbol 21
  27.  
  28.                            (make-arbol 12 empty
  29.  
  30.  
  31.  
  32.                                        (make-arbol 8 empty
  33.  
  34.                                                    (make-arbol 7 empty empty)))
  35.  
  36.   (make-arbol 24
  37.  
  38.               (make-arbol 32 empty empty)
  39.  
  40.               (make-arbol 30 empty empty)
  41.  
  42.               )
  43.   )
  44.   )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement