Treez interview question

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