+ 1
About Tree and recursive and i do not totally understand that. Can someone explain it for me, please ???
public int count(Object n) { int count = 1; // includes n if (edges != null) { Object[] e; for (Object eobj : edges) { e = (Object[]) eobj;// i do not understand this code if (e[0] == n) { count += count(e[1]); } } } return count; }
1 Answer
+ 1
Check out link
https://en.m.wikipedia.org/wiki/Recursion_(computer_science)