class BST {

    public boolean contains(Key key) {
        if (key == null)
            throw new IllegalArgumentException("key not null");
        Node cur = find(root, key);
        return cur != null;
    }

}