Ask your own question, for FREE!
Computer Science 9 Online
OpenStudy (anonymous):

I'm not sure how many people on here know Scheme, but I was wondering if anyone could help me figure out how to convert a binary search tree (with an integer key, a left node and a right node) into a list of integers. Additionally I can't use append and my solution needs to be in O(n). Thanks!

OpenStudy (anonymous):

Thanks to anyone who took a look. I figured out a solution on my own though

OpenStudy (shadowfiend):

Ah sweet heh. Was going to ask to see your BST's structure first :)

OpenStudy (anonymous):

The structure was pretty simple just, (define-struct BST (key left right) #:transparent)

OpenStudy (shadowfiend):

Got it. Cool stuff! :)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!