Solved

Given the BinaryTree Class (Partially Shown Below), Select an Expression

Question 60

Multiple Choice

Given the BinaryTree class (partially shown below) , select an expression to complete the static recursive helper method countLeaves, which returns the number of leaf nodes in the binary tree rooted at node n. Given the BinaryTree class (partially shown below) , select an expression to complete the static recursive helper method countLeaves, which returns the number of leaf nodes in the binary tree rooted at node n.    A) n.right == null B) n.left == null || n.right == null C) n.left == null D) n.left == null && n.right == null


A) n.right == null
B) n.left == null || n.right == null
C) n.left == null
D) n.left == null && n.right == null

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents