←back to thread

295 points todsacerdoti | 1 comments | | HN request time: 0.522s | source
Show context
stevage ◴[] No.45952883[source]
>Many software developers will argue that asking a candidate to reverse a binary tree is pointless

Is "reversing a binary tree" actually a thing, or is this a cute kind of "rocket surgery" phrase intentionally mixing reversing a linked list and searching a binary tree?

replies(2): >>45952919 #>>45952961 #
1. stingraycharles ◴[] No.45952919[source]
It’s probably a mistake on the author’s end, but the problem comes across anyway.

I can only imagine reversing a binary tree would imply changing the “<“ comparison in nodes to “>” which would be a useless exercise