C 言語でバイナリ ツリー トラバーサルを書いてください

#include <stdio.h> struct node { int data; struct node left, right; }; /バイナリ ツリーのリーフ ノードを出力する関数/ void printLeaves(struct node* root) { if ( root != NULL ) { printLeaves(root->left); };

// 如果节点为叶子节点,则打印
    if ( root-

おすすめ

転載: blog.csdn.net/weixin_35749440/article/details/129519475