Nimble Robotics Interview Question

Encode and decode a binary tree