teaching machines

CS 245 Lecture 23 – Binary Search Trees

November 21, 2013 by . Filed under cs245, fall 2013, lectures.

Agenda

What Does This Do?

public class Point3D {
  private int x;
  private int y;
  private int z;

  public Point3D(int x,
                 int y,
                 int z) {
    this.x = x;
    this.y = y;
    this.z = z;
  }

  public static void main(String[] args) {
    Hashtable<Point3D, String> pointsToNames = new Hashtable<Point3D, String>();

    Point3D p = new Point3D(0, 1, 2);
    pointsToNames.put(p, "Hydrogen");

    Point3D p2 = new Point3D(0, 1, 2);

    System.out.println(pointsToNames.get(p));
    System.out.println(pointsToNames.get(p2));
  }
}

Hash Links

Code

Haiku

Two roads, they diverged
I hope I took the right one
The one to Zaire