Pergunta de entrevista da empresa Amazon

Serialize (flatten) and de-serialize a binary tree. First describe the approach, then write the code.

Respostas da entrevista

Sigiloso

20 de dez. de 2012

http://www.leetcode.com/2010/09/serializationdeserialization-of-binary.html

Sigiloso

20 de dez. de 2012

For BST http://www.leetcode.com/2010/09/saving-binary-search-tree-to-file.html

Sigiloso

25 de jun. de 2012

I know that some people didn't get to the de-serialization code...so it might be a bit long. The question itself is pretty basic so the objective should be to provide a clear explanation and code. Interviewer seemed happy that I didn't jump straight to the solution, but instead inquired about any system restrictions, requirements etc.