One solution to the rank problem.
int rank(Vector v, Object ob) {
for (int i=0; i<v.size(); i++) {
if (v.elementAt(i).equals(ob)) return i;
}
return -1;
}
Previous slide
Next slide
Back to first slide
View graphic version