Question d’entretien chez Google

1. Determine the balanced binary tree. 2. Pattern match 3. Longest consecutive ones

Réponses aux questions d'entretien

Utilisateur anonyme

2 sept. 2018

1. You can check if the tree is balanced by using a function that calculates the height of root from the bottom up while propagating up if any subtree is unbalanced!

Utilisateur anonyme

3 sept. 2018

Longest consecutive ones in an array? Create a sliding window and when you find something that it's not a 1 update max.