public int timX (Node t, int x){ if(t==null) return 0; if((int )t.info==x) return 1; else return timX(t.left, x)+ timX(t.right, x); } public void timX(int x) { if (timX(r, x) == 1)// co the ==0 System.out.println("co");// =0 thi la khong else System.out.println("khong");//== 0 thi la co }
Không có nhận xét nào: