Domanda di colloquio di Amazon

Write a function to serialize a binary tree.

Risposta di colloquio

Anonimo

13 nov 2011

I just stored the tree in an array with the index corresponding to its position in the tree.