Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void najmanji(node *root)
- {
- if(!root) return;
- node *current;
- for(current = root; current->left; current = current->left);
- cout << "Najmanji element u stablu je "<< current->value << endl;
- }
- int suma(node *root)
- {
- if (root == NULL)
- return 0;
- return (root->value + suma(root->left) + suma(root->right));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement