Here is trial version to see if the let* expression works to create three variables. lenLST is number of nodes in the Left SubTree. lenRST is the number of nodes or size of the Right SubTree. root is the root node value of the entire tree. (define (makeTree pre in) (let* ((root (car pre)) (lenLST (- (length in) (length (member root in)))) (lenRST (- (length in) (+ lenLST 1))) ) (list root lenLST lenRST))) > (define post_t (postorder t)) > (define pre_t (preorder t)) > (define in_t (inorder t)) > in_t (9 11 16 22 33 44 55) > pre_t (44 22 11 9 16 33 55) > (makeTree pre_t in_t) (44 5 1) > pre_t (44 22 11 9 16 33 55) PREORDER > in_t (9 11 16 22 33 44 55) INORDER > post_t (9 16 11 33 22 55 44) POSTORDER > t (44 (22 (11 (9 () ()) (16 () ())) (33 () ())) (55 () ())) Trial version number two. Shows task is completed for getting the leftsubtree preorder and inorder lists. (define (makeTree pre in) (let* ((root (car pre)) (lenLST (- (length in) (length (member root in)))) (lenRST (- (length in) (+ lenLST 1))) (preLST (list-head (cdr pre) lenRST)) (inLST (list-head in (+ lenRST 1))) ) (list root preLST inLST))) > (define pre_t (preorder t)) > (define in_t (inorder t)) > (makeTree pre_t in_t) (44 (22 11 9 16 33) (9 11 16 22 33)) ----> pre_t (44 22 11 9 16 33 55) PREORDER ----> in_t (9 11 16 22 33 44 55) INORDER Finally, the following code demonstrates getting the preorder and inorder lists both both the right subtree and the left subtree. All that is left is to figure out the base case and recursive step. (define (makeTree pre in) (let* ((root (car pre)) (lenLST (- (length in) (length (member root in)))) (lenRST (- (length in) (+ lenLST 1))) (preLST (list-head (cdr pre) lenRST)) (inLST (list-head in (+ lenRST 1))) (preRST (list-tail pre (- (length pre) lenRST))) (inRST (list-tail in (- (length in) lenRST))) ) (list root preLST inLST preRST inRST))) > (makeTree pre_t in_t) (44 (22 11 9 16 33) (9 11 16 22 33) (55) (55)) ********** See below here for the working application code *********** ********** Very little was added to complete makeTree *********** 33 Preorder: 33, 11, 22, 44 / \ Inorder: 11, 22, 33, 44 11 44 \ See the greenTree below 22 > (define greenTree (makeTree '(33 11 22 44) '(11 22 33 44))) > greenTree (33 (11 () (22 () ())) (44 () ())) > (define in_t (inorder t)) > (define pre_t (preorder t)) > (define oak (makeTree pre_t in_t)) > oak (44 (22 (11 (9 () ()) (16 () ())) (33 () ())) (55 () ())) > t (44 (22 (11 (9 () ()) (16 () ())) (33 () ())) (55 () ())) And here is the not necessarily FINAL solution, but it is a working solution. (define (makeTree pre in) (if (= (length pre) 0) '() (let* ((root (car pre)) (lenLST (- (length in) (length (member root in)))) (lenRST (- (length in) (+ lenLST 1))) (preLST (list-head (cdr pre) lenRST)) (inLST (list-head in (+ lenRST 1))) (preRST (list-tail pre (- (length pre) lenRST))) (inRST (list-tail in (- (length in) lenRST)))) (list root (makeTree preLST inLST) (makeTree preRST inRST))))) > (define pantherTree (makeTree '(N U I) '(U N I))) > pantherTree (n (u () ()) (i () ()))