|
|
|
|
|
by tropo
2612 days ago
|
|
Is there something special about reversing a binary tree? AFAIK, you could swap the child pointers and do that recursively for the child nodes. You could also do things O(1) by just changing the comparison function, perhaps by wrapping it to negate the comparison. |
|
https://twitter.com/mxcl/status/608682016205344768?lang=en