private int findLinearly(int markerId) {
    int low = Math.max(0, size() - LINEAR_SEARCH_LIMIT);
    for (int i = size() - 1; i >= low; i--) {
      if (a[i] == markerId) {
        return i;
      }
    }
    return -1;
  }
private int findLinearly(int markerId)