logoalt Hacker News

stevagetoday at 12:05 PM2 repliesview on HN

>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

nitnelavetoday at 12:19 PM

I think it's a reference to the Google interview problem that the author of Homebrew (IIRC) failed. They were quite upset about it since they have proved their worth through their famous open-source contributions, but got rejected in a LeetCode-like interview.

stingraycharlestoday at 12:11 PM

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