All Questions
3 questions
8
votes
1
answer
1k
views
Search iteratively in a ternary search tree
I was trying to write an iterative search function for my Ternary Search Tree class based on a pseudo-code, and now it seems to work, but I think it can definitely be improved.
...
0
votes
2
answers
734
views
How to enumerate the internal nodes and leaves of a tree more elegantly?
Might there be a simpler way to write this code? I'd like to learn to write code more efficiently.
...
8
votes
2
answers
11k
views
Returning a list of the values from the binary tree
I want to return a list of the values from the binary tree. Is there a shorter and more efficient way to write the method for numbers?
...