Cracking the Code -- Recursive Tree + Graph answers
1 Answer
Cracking the Code -- Recursive Tree + Graph answers
| Flag | PURGE
I'm reading through cracking the code and I noticed that all of the Tree and Graph coding challenges were answered recursively. I was wondering why, and what is the advantage of doing this? I was under the assumption that recursive answers for Trees and Graphs was a bad idea due to stack overflows. Similarly, do you guys generally answer Tree and Graph related questions in a recursive fashion during interviews?
~Best
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
Email me when people comment.
Email me when people comment.
Loading...
An error occurred in subscribing you.
CareerCup is the world's biggest and best source for software engineering interview preparation. See all our resources.
Generally it's easier to code some of what you mention recursively, so that's why people do it.
- Anonymous January 06, 2015