Pergunta de entrevista da empresa Amazon

how do you find ancestors on a doubly linked tree ?