← Questions

Serialize and deserialize an N-ary tree

0
UberCodingLast asked Jul 2026

A coding interview question asked in Uber's coding round, last asked Jul 2026. It tests trees, serialization and recursion.

In a rooted N-ary tree each node has any number of children, kept in a fixed order. Design a string format for such trees and implement both directions: serialize turns a tree into a string, and deserialize rebuilds the tree from that…

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

  • Uber · Coding · Last asked Jul 202660 min · Two rounds; one is often object-oriented design (a parking lot, a meeting scheduler, an expression evaluator) · No AI, except a newer AI-assisted debugging round in some senior loops

What it tests

trees · serialization · recursion

Your code and the AI tutor open when you unlock this question.