Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void i_maxim(node_arbreNari* n, T &max){
- max = n->info;
- for (int i = 0; i < n->seg.size(); i++){
- if (n->seg[i] != NULL){
- T aux;
- i_maxim(n->seg[i],aux);
- if (max < aux) max = aux;
- }
- }
- }
- T maxim() const
- /* Pre: el p.i. no és buit */
- /* Post: el resultat indica el valor més gran que conté el p.i. */
- {
- T max;
- i_maxim(primer_node,max);
- return max;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement