This post has been edited 1 times, last edit by "epix" (Jul 1st 2010, 3:09pm)
Date of registration: Oct 2nd 2006
Location: NRW -> Bad Oeynhausen
Occupation: B.Sc. Informatik, 8.Semester
![]() |
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 |
public T searchItem(T item) { int c = this.item.compareTo(item); if(c<0) { if(leftNode == null) return null; return leftNode.searchItem(item); } if(c>0) { if(rightNode == null) return null; return rightNode.searchItem(item); } return this.item; } |