Created
November 27, 2014 10:08
-
-
Save volgar1x/f830512fbcbbbf672a6e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun add (elem arbre) | |
(cond | |
((null arbre) | |
(list elem nil nil)) | |
((plus-grand elem (rac arbre)) | |
(list (rac arbre) | |
(sag arbre) | |
(add elem (sad arbre)))) | |
((plus-petit elem (rac arbre)) | |
(list (rac arbre) | |
(add elem (sag arbre)) | |
(sad arbre))) | |
(t | |
arbre))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment