Tuesday common C++ interview problem: Serialize and de-serialize an n-ary tree.
Each node stores a uint32_t value and a vector of weak pointers to children.
To add nodes to a tree, use the add_node method.
Solve it yourself: https://compiler-explorer.com/z/M6Mx9qxfn
Solution: https://compiler-explorer.com/z/h5Kbe4avY