Design an algorithm to determine whether a binary tree is valid.
Anonymous
I wrote pseudocode for DFS and also kept a set with all seen node ids. If I saw the same id more than once, I returned false. If I got through the search, then I returned true.
Check out your Company Bowl for anonymous work chats.