What may be the psuedo code for finding the size of a tree?

Q & ACategory: Data StructureWhat may be the psuedo code for finding the size of a tree?
Admin Staff asked 4 years ago

What may be the psuedo code for finding the size of a tree?
a) find_size(root_node–>left_node) + 1 + find_size(root_node–>right_node)
b) find_size(root_node–>left_node) + find_size(root_node–>right_node)
c) find_size(root_node–>right_node) – 1
d) find_size(root_node–>left_node + 1

1 Answers
Admin Staff answered 4 years ago

a) find_size(root_node–>left_node) + 1 + find_size(root_node–>right_node)