• ↑↓ pour naviguer
  • pour ouvrir
  • pour sélectionner
  • ⌘ ⌥ ↵ pour ouvrir dans un panneau
  • ←→ pour naviguer
  • esc pour rejeter
⌘ '
raccourcis clavier

Binary Tree

  • Courses

  • Tutorials

  • Practice

  • Jobs

  • DSA

  • Practice Problems

  • C

  • C++

  • Java

  • Python

  • JavaScript

  • Data Science

  • Machine Learning

  • Courses

  • Linux

  • DevOps

What does the following function compute?

int count(struct Node* root) { if (root == NULL) return 0; return 1 + count(root->left) + count(root->right); }

int count(struct Node* root) {
if (root == NULL) return 0;
return 1 + count(root->left) + count(root->right);
}

Height of the tree

Number of leaf nodes

Total number of nodes

Number of internal nodes

This question is part of this quiz :

author
author