Guild icon
#fridolin <3
TP5 C / โœ…-tester-si-un-arbre-est-un-abr
Avatar
node.c int isNodeBST(p_node pn) { if (pn == NULL) return 1; if (pn->left != NULL && pn->left->value > pn->value) return 0; if (pn->right != NULL && pn->right->value < pn->value) return 0; if (!isNodeBST(pn->left) || !isNodeBST(pn->right)) return 0; return 1; }
๐Ÿซต 1
๐Ÿณ๏ธโ€๐ŸŒˆ 1
๐Ÿ‘จโ€๐ŸŒพ 2
๐Ÿ—ฟ 2
16:24
bintree.c #include "bintree.h" int isBST(t_tree t) { return isNodeBST(t.root); }
๐Ÿซต 1
๐Ÿคจ 1
Avatar
@Ketrente marche pas pour moi ๐Ÿคค
Avatar
marche pour moi ๐Ÿคค
Avatar
ok
Avatar
att je revérifie
Avatar
marche pas nn plus
14:21
mais j'ai l'impression c'est l'exo qui est bug
Avatar
ouais j'ai regardé de son côté ça marche pas mais avec moi ça marche
14:26
on pense aussi que c'est l'exo qui est bug
Exported 10 message(s)