tree in-order
Posted: Sat Dec 17, 2011 5:26 am
I have a tree of type (2)
A
/ \
B C
/ \
D E
I have this function which returns my nods in post-order
(defun postordine(l)
(cond
((null l) l)
(t (append (postordine (car (cdr l))) (postordine (car (cdr (cdr l)))) (list(car l))))
)
)
I need to change it for a in-order
any help ? :] or link to some tutorials
A
/ \
B C
/ \
D E
I have this function which returns my nods in post-order
(defun postordine(l)
(cond
((null l) l)
(t (append (postordine (car (cdr l))) (postordine (car (cdr (cdr l)))) (list(car l))))
)
)
I need to change it for a in-order
any help ? :] or link to some tutorials