solulubeta
Sign in
NeetCode 150 / Trees
07.15 · Problem

Serialize and Deserialize Binary Tree

Hard Preorder with null markers 1 video LC 297 Pro

This problem is part of solulu Pro

Design a Codec with serialize(root), which turns a binary tree into a string, and deserialize(data), which rebuilds exactly the same tree from that string. Any format is allowed; the judge checks that…

Lifetime ₹1,999 ₹999 · Launch offer
Mark this problem as solved when you are finished.

Item 60 of 150 · updated 2026-10-12