|
|
|
|
|
by repsilat
2095 days ago
|
|
Honestly, it's an O(1) solution depending on choice of data structure, possibly constant-factor more efficient through your program depending on language, and if you're programming on a whiteboard it might also arguably be the idiomatic way to do it in that context. Limited in that you can only have one tree per whiteboard, though. |
|