Addepar Interview Question

DSA question - need to create a recursively tree type structure.