← Amazon questions
CodingReported in a candidate post, Jul 2025

Serialize and deserialize a binary tree

Filed under Amazon · Also reported at Accolite, Flipkart, InMobi, LinkedIn, Nvidia

Design an algorithm to serialize a binary tree to a string and deserialize that string back to the original tree. The format is up to you, but deserialize(serialize(root)) must rebuild the same tree.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Amazon questions

Collected from public candidate posts and coding forums. Updated Nov 2026.