All pastes #286546 Raw Edit

Something

public text v1 · immutable
#286546 ·published 2006-12-20 19:34 UTC
rendered paste body
	public void add(int element) {
		IntBTNode Previous;
			// put to right
			Previous = tree;
			Boolean  isNull;
			isNull = false;
			while (isNull == false) {
				if (getData(Previous) <= element) {
					if (getRighttRef(Previous) == null) {
						isNull = true;
					}
					else {
						Previous = getRighttRef(Previous);
					}
				}
				else {
					if (getLeftRef(Previous) == null) {
						isNull = true;
					}
					else {
						Previous = getLeftRef(Previous);
					}
				}
			}
			Previous.setData(element);
			System.out.println("Added " + getData(Previous));
	}