Treez Interview Question

Random Algo Question. How would you architect/design a system