Conta filhos Node
15/06/2017
0
public int contaFilhosNodo(GeneralTree t){ int contador = t.degree; return this.countNodes(t, contador); } private int countNodes(GeneralTree t, int c){ Node current = t.list.getFirst(); while(current!= null){ c = c + this.countNodes((GeneralTree) current.getData(),((GeneralTree) current.getData()).degree); current = current.getNext(); } return c; }
Ricardo
Curtir tópico
+ 0
Responder
Clique aqui para fazer login e interagir na Comunidade :)