Azienda coinvolta
Code to get the depth of a binary tree.
Anonimo
int depth(node * root) { if (root == null) return 0; return max(depth(root->left), depth(root->right) + 1; }
should be easy if you have done it before.
Non lasciarti sfuggire opportunità e informazioni privilegiate seguendo le aziende dove vorresti lavorare.
Ricevi suggerimenti e aggiornamenti personalizzati avviando le tue ricerche.