Skip to main content

All Questions

Filter by
Sorted by
Tagged with
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. ...
user avatar
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. ...
muros's user avatar
  • 181
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? ...
muros's user avatar
  • 181