Pergunta de entrevista da empresa MetaCarta

Given an n-ary tree, sketch an algorithm for traversing the tree in depth-first and breadth-first order.