Pergunta de entrevista da empresa Huawei Technologies

Write a function that returns all the ancestors of a node.