Search found 1 match
- Thu Oct 07, 2010 9:10 am
- Forum: Common Lisp
- Topic: LISP Problem with Binary Search Tree (Please help!!)
- Replies: 1
- Views: 5736
LISP Problem with Binary Search Tree (Please help!!)
I hv wrote a function to search a value if it's in a binary search tree (the output is T when it's in the binary tree, otherwise NIL): (defun search1 (a) (if (listp temp) (and (setq node (car temp)) (setq left (cadr temp)) (setq right (caddr temp)))) (if (listp node) (setq node1 (car node)) (setq no...