Pregunta de entrevista de Amazon

Encode and decode a BST into a string (write a function to store it in string format, then a function to read it into a BST)

Respuesta de la entrevista

Anónimo

5 nov 2022

You can use a preorder traversal with keeping track of the root to encode and decode the BST.