Question d’entretien chez Clearwater Analytics (CWAN)

Write a method that will be given two nodes in a binary tree and will return the common ancestor node for them.

Réponse à la question d'entretien

Utilisateur anonyme

29 sept. 2011

I wrote a brute force solution that walked up each side of the tree and then tried a recursive solution and had it mostly done when time ran out. This was by far the most interesting question because it is an example of the kind of problem that real engineers have to solve.