top | item 35035852

(no title)

gifnamething | 3 years ago

Are you confusing a binary tree with something else?

Here's an example:

https://leetcode.com/problems/invert-binary-tree/

It's an 'easy' question. The solution is <10 lines.

discuss

order

zeroonetwothree|3 years ago

Yeah it's really easy. I wrote a correct solution in about 30 seconds on my first try. And I haven't actually practiced these problems for 10+ years.