@Test public void select() { for (int i = 0; i < expect.size(); i++) { Assert.assertEquals(expect.select(i), bst.select(i)); } }
public Key select(int rank) { if (rank < 0 || rank >= size()) throw new NoSuchElementException("rank is out of range"); return select(root, rank).key; }
BST { public Key select(int rank) { if (rank < 0 || rank >= size()) throw new NoSuchElementException("rank is out of range"); return select(root, rank).key; } }
BST { public Key select(int rank) { if (rank < 0 || rank >= size()) throw new NoSuchElementException("rank is out of range"); return select(root, rank).key; }  }
BST { public Key select(int rank) { if (rank < 0 || rank >= size()) throw new NoSuchElementException("rank is out of range"); return select(root, rank).key; }  int size(); boolean isEmpty(); boolean contains(Key key); Val find(Key key); void put(Key key, Val val); boolean remove(Key key); Key select(int rank); int rank(Key key); Key floor(Key key); Key ceil(Key key); }
BST { public Key select(int rank) { if (rank < 0 || rank >= size()) throw new NoSuchElementException("rank is out of range"); return select(root, rank).key; }  int size(); boolean isEmpty(); boolean contains(Key key); Val find(Key key); void put(Key key, Val val); boolean remove(Key key); Key select(int rank); int rank(Key key); Key floor(Key key); Key ceil(Key key);  }