hima890 / binary_trees

A collection of C programs for learning and implementing binary tree operations, including traversal, insertion, deletion, and validation. Ideal for understanding fundamental data structures and algorithms in C programming.
GNU General Public License v3.0
0 stars 0 forks source link

10. Depth #10

Closed hima890 closed 3 months ago

hima890 commented 3 months ago

Write a function that measures the depth of a node in a binary tree

*Prototype: size_t binary_tree_depth(const binary_tree_t tree);** Where tree is a pointer to the node to measure the depth If tree is NULL, your function must return 0 alex@/tmp/binary_trees$ cat 10-main.c

include

include

include "binary_trees.h"

/**

hima890 commented 3 months ago

Its on