{
private Comparable value;
private TreeNode left;
private TreeNode right;
// Constructor:
public TreeNode(Comparable initValue, TreeNode initLeft, TreeNode initRight)
{
value = initValue;
left = initLeft;
right = initRight;
}
// Methods:
public Comparable getValue() { return value; }
public TreeNode getLeft() { return left; }
public TreeNode getRight() { return right; }
public void setValue(Comparable theNewValue) { value = theNewValue; }
public void setLeft(TreeNode theNewLeft) { left = theNewLeft; }
public void setRight(TreeNode theNewRight) { right = theNewRight; }
}
Published by Chris Chen
Chris is currently attending the University of California, Berkeley seeking an undergraduate's degree in Electrical Engineering Computer Science. He enjoys playing basketball, practicing kendo, hanging out w... View profile
- Blog Search Engines Are a Better Way to Sort Through the BlogosphereUsing regular search engines is GREAT, except for finding blogs. If you only use the regular search, you may be missing out on one of the most powerful ways to get the latest news and information, as well as see what...
- John Grabow: The Next Jewish Yankees' Left Hander?Yankees' scout Bill Emslie had been sent to watch Pittsburgh Pirates' left handed relief pitcher John Grabow, which is not surprising since the Yankees have been seeking a reliable lefty specialist since the departure...
- Obama: Darling of the Left, Darling of the RightObama personifies the ideal of the progressive movement. Ironically, the very attributes that make Obama the perfect candidate for the left render him a godsend to the right. Is Obama too much of a good thing?
- In Two Minds. (Left and Right Handed Thinking)...today left-handers are forced to live in a right-handed world and that doesn't look like changing any day soon. This is bad enough for lefties by itaelf but there is another, more significant underlying difference.
According to the National Motorists Association, June is "lane Courtesy...They are so annoying that Weird Al Yankovich should write a song about them. Some organizations have created bumper and window stickers about it. Slow drivers in the left lane...
- Left Brained Teaching and Its Effect on Right Brained Students
- How to Knit Left Handed
- Freeze Left Over Wine to Use Later
- The No Child Left Behind Legislation is Not Working
- What Does No Child Left Behind Mean?
- Why Do Slower Drives Hog the Left Lane?
- How Public Speaking Skills Can Help You Get Ahead in a Tough Economy



